Skip to content

Instantly share code, notes, and snippets.

@jamescook
Created May 17, 2011 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamescook/976457 to your computer and use it in GitHub Desktop.
Save jamescook/976457 to your computer and use it in GitHub Desktop.
describe Object do
describe "#blank?" do
- it "should return true for blank objects" do
- [nil, false, [], {}].each { |object| object.should be_blank }
+ [nil, false, [], {}].each do |blanky|
+ it %Q{should return true for '#{blanky.inspect}' objects} do
+ blanky.blank?.should be_true
+ end
end
it "should return false for non-blank objects" do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment