diff options
Diffstat (limited to 'spec/ruby/core/array/empty_spec.rb')
-rw-r--r-- | spec/ruby/core/array/empty_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/array/empty_spec.rb b/spec/ruby/core/array/empty_spec.rb new file mode 100644 index 0000000000..d6235114b7 --- /dev/null +++ b/spec/ruby/core/array/empty_spec.rb @@ -0,0 +1,10 @@ +require File.expand_path('../../../spec_helper', __FILE__) +require File.expand_path('../fixtures/classes', __FILE__) + +describe "Array#empty?" do + it "returns true if the array has no elements" do + [].empty?.should == true + [1].empty?.should == false + [1, 2].empty?.should == false + end +end |