blob: 0c619078818d7a892a857313d3624ad5ebc21b80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
require_relative '../../spec_helper'
require_relative 'shared/iterable_and_tolerating_size_increasing'
describe "Array#one?" do
@value_to_return = -> _ { false }
it_behaves_like :array_iterable_and_tolerating_size_increasing, :one?
it "ignores the block if there is an argument" do
-> {
['bar', 'foobar'].one?(/foo/) { false }.should == true
}.should complain(/given block not used/)
end
end
|