1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

check for dup proc by comparing call value of a test proc

This commit is contained in:
Nathan Lilienthal 2013-03-25 10:50:30 -04:00
parent 3f27f99d16
commit 773010e230

View file

@ -603,12 +603,12 @@ describe HTTParty do
end
it 'should dup the proc on the child class' do
imaginary_option = lambda { "This is a new lambda" }
imaginary_option = lambda { 2 * 3.14 }
@parent.default_options[:imaginary_option] = imaginary_option
is(@parent.default_options[:imaginary_option]).should == is(imaginary_option)
@parent.default_options[:imaginary_option].should be_equal imaginary_option
@child1.default_options[:imaginary_option]
is(@child1.default_options[:imaginary_option]).should == is(imaginary_option)
is(@child1.default_options[:imaginary_option]).should be_equal is(imaginary_option)
@child1.default_options[:imaginary_option].call.should == imaginary_option.call
@child1.default_options[:imaginary_option].should_not be_equal imaginary_option
end
it "inherits default_cookies from the parent class" do