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:
parent
3f27f99d16
commit
773010e230
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue