From 4e176dec898bb57951e3a25606cbc1ba712608d8 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Sun, 20 Apr 2008 03:54:50 +0300 Subject: [PATCH] Sweet empty lines management, what a wonderful way to apply yourself to. --- spec/private/core_ext/object_spec.rb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/spec/private/core_ext/object_spec.rb b/spec/private/core_ext/object_spec.rb index c7a731f3..6e7d884f 100644 --- a/spec/private/core_ext/object_spec.rb +++ b/spec/private/core_ext/object_spec.rb @@ -1,39 +1,38 @@ require File.dirname(__FILE__) + '/../../spec_helper' class Foo - end -describe Object do - +describe Object do it "should treat an empty string as blank" do "".should be_blank end - + it "should treat a string with just spaces as blank" do " ".should be_blank end - + it "should treat an empty array as blank" do [].should be_blank end - + it "should treat boolean false as blank" do false.should be_blank end - end + + describe Object, "#quacks_like" do it "use respond_to? to determine quacks_like :symbol" do "Foo".should be_quacks_like(:strip) end - + it "should return true if any of the elements in the Array are true" do "Foo".should be_quacks_like([String, Array]) end - + it "should return false if an invalid value is passed in" do "Foo".should_not be_quacks_like({}) end -end \ No newline at end of file +end