mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -9,22 +9,22 @@ describe "Range#bsearch" do
|
|||
it_behaves_like :enumeratorized_with_unknown_size, :bsearch, (1..3)
|
||||
|
||||
it "raises a TypeError if the block returns an Object" do
|
||||
lambda { (0..1).bsearch { Object.new } }.should raise_error(TypeError)
|
||||
-> { (0..1).bsearch { Object.new } }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
it "raises a TypeError if the block returns a String" do
|
||||
lambda { (0..1).bsearch { "1" } }.should raise_error(TypeError)
|
||||
-> { (0..1).bsearch { "1" } }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
it "raises a TypeError if the Range has Object values" do
|
||||
value = mock("range bsearch")
|
||||
r = Range.new value, value
|
||||
|
||||
lambda { r.bsearch { true } }.should raise_error(TypeError)
|
||||
-> { r.bsearch { true } }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
it "raises a TypeError if the Range has String values" do
|
||||
lambda { ("a".."e").bsearch { true } }.should raise_error(TypeError)
|
||||
-> { ("a".."e").bsearch { true } }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
context "with Integer values" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue