summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerable/all_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/enumerable/all_spec.rb')
-rw-r--r--spec/ruby/core/enumerable/all_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/ruby/core/enumerable/all_spec.rb b/spec/ruby/core/enumerable/all_spec.rb
index b782f94a3e..160cd52628 100644
--- a/spec/ruby/core/enumerable/all_spec.rb
+++ b/spec/ruby/core/enumerable/all_spec.rb
@@ -131,7 +131,6 @@ describe "Enumerable#all?" do
pattern.yielded.should == [[0], [1], [2], [-1]]
end
- # may raise an exception in future versions
it "always returns true on empty enumeration" do
@empty.all?(Integer).should == true
[].all?(Integer).should == true
@@ -178,5 +177,11 @@ describe "Enumerable#all?" do
multi.all?(pattern).should == true
pattern.yielded.should == [[[1, 2]], [[3, 4, 5]], [[6, 7, 8, 9]]]
end
+
+ it "ignores the block if there is an argument" do
+ -> {
+ EnumerableSpecs::Numerous.new(1, 2, 3, 4, 5).all?(String) { true }.should == false
+ }.should complain(/given block not used/)
+ end
end
end