mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@032ee74
This commit is contained in:
parent
f646d20aae
commit
5aaa75e7c1
263 changed files with 921 additions and 921 deletions
|
@ -4,17 +4,17 @@ describe "Array#any?" do
|
|||
describe 'with no block given (a default block of { |x| x } is implicit)' do
|
||||
it "is false if the array is empty" do
|
||||
empty_array = []
|
||||
empty_array.any?.should == false
|
||||
empty_array.should_not.any?
|
||||
end
|
||||
|
||||
it "is false if the array is not empty, but all the members of the array are falsy" do
|
||||
falsy_array = [false, nil, false]
|
||||
falsy_array.any?.should == false
|
||||
falsy_array.should_not.any?
|
||||
end
|
||||
|
||||
it "is true if the array has any truthy members" do
|
||||
not_empty_array = ['anything', nil]
|
||||
not_empty_array.any?.should == true
|
||||
not_empty_array.should.any?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue