spec/latinum/resource_spec.rb in latinum-0.5.5 vs spec/latinum/resource_spec.rb in latinum-0.5.6

- old
+ new

@@ -70,7 +70,16 @@ quotient = original_price / 2.0 expect(original_price / 2.0).to be == Latinum::Resource.load("5 NZD") end + + it "should compare with nil" do + a = Latinum::Resource.load("10 NZD") + + expect{a <=> nil}.to_not raise_exception + expect{a == nil}.to_not raise_exception + expect(a <=> nil).to be == nil + expect(a == nil).to be == false + end end end