forked from wycats/merb-core
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sweet empty lines management, what a wonderful way to apply yourself to.
- Loading branch information
1 parent
ae95175
commit 4e176de
Showing
1 changed file
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
end |