diff options
Diffstat (limited to 'spec/ruby/core/hash/assoc_spec.rb')
| -rw-r--r-- | spec/ruby/core/hash/assoc_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/hash/assoc_spec.rb b/spec/ruby/core/hash/assoc_spec.rb index 62b2a11b30..51af51a20f 100644 --- a/spec/ruby/core/hash/assoc_spec.rb +++ b/spec/ruby/core/hash/assoc_spec.rb @@ -6,7 +6,7 @@ describe "Hash#assoc" do end it "returns an Array if the argument is == to a key of the Hash" do - @h.assoc(:apple).should be_an_instance_of(Array) + @h.assoc(:apple).should.instance_of?(Array) end it "returns a 2-element Array if the argument is == to a key of the Hash" do @@ -40,11 +40,11 @@ describe "Hash#assoc" do end it "returns nil if the argument is not a key of the Hash" do - @h.assoc(:green).should be_nil + @h.assoc(:green).should == nil end it "returns nil if the argument is not a key of the Hash even when there is a default" do - Hash.new(42).merge!( foo: :bar ).assoc(42).should be_nil - Hash.new{|h, k| h[k] = 42}.merge!( foo: :bar ).assoc(42).should be_nil + Hash.new(42).merge!( foo: :bar ).assoc(42).should == nil + Hash.new{|h, k| h[k] = 42}.merge!( foo: :bar ).assoc(42).should == nil end end |
