Permalink
Browse files

Make sure we are dealing with nil; not falsy values

  • Loading branch information...
1 parent d9b5748 commit 3ce274a8672ffd72ba75cd19c5cc5757e7e6f875 @nevir nevir committed Apr 6, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 spec/features/safe_chaining_spec.rb
@@ -26,4 +26,8 @@
nil.n.nil?.should == true
end
+ it "should not treat false as nil" do
+ expect { false.n.bad_method }.to raise_error
+ end
+
end

0 comments on commit 3ce274a

Please sign in to comment.