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
|
|
@ -16,7 +16,7 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "returns an ArgumentError if not given an Proc or #call" do
|
||||
lambda { Readline.completion_proc = "test" }.should raise_error(ArgumentError)
|
||||
-> { Readline.completion_proc = "test" }.should raise_error(ArgumentError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "raises a TypeError when the passed Object can't be converted to a String" do
|
||||
lambda { Readline::HISTORY << mock("Object") }.should raise_error(TypeError)
|
||||
-> { Readline::HISTORY << mock("Object") }.should raise_error(TypeError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "raises an IndexError when the given index is greater than the history size" do
|
||||
lambda { Readline::HISTORY.delete_at(10) }.should raise_error(IndexError)
|
||||
lambda { Readline::HISTORY.delete_at(-10) }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY.delete_at(10) }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY.delete_at(-10) }.should raise_error(IndexError)
|
||||
end
|
||||
|
||||
it "taints the returned strings" do
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "raises an IndexError when there is no item at the passed index" do
|
||||
lambda { Readline::HISTORY[-10] }.should raise_error(IndexError)
|
||||
lambda { Readline::HISTORY[-9] }.should raise_error(IndexError)
|
||||
lambda { Readline::HISTORY[-8] }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[-10] }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[-9] }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[-8] }.should raise_error(IndexError)
|
||||
|
||||
lambda { Readline::HISTORY[8] }.should raise_error(IndexError)
|
||||
lambda { Readline::HISTORY[9] }.should raise_error(IndexError)
|
||||
lambda { Readline::HISTORY[10] }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[8] }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[9] }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[10] }.should raise_error(IndexError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "raises an IndexError when there is no item at the passed positive index" do
|
||||
lambda { Readline::HISTORY[10] = "test" }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[10] = "test" }.should raise_error(IndexError)
|
||||
end
|
||||
|
||||
it "sets the item at the given index" do
|
||||
|
|
@ -29,7 +29,7 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "raises an IndexError when there is no item at the passed negative index" do
|
||||
lambda { Readline::HISTORY[10] = "test" }.should raise_error(IndexError)
|
||||
-> { Readline::HISTORY[10] = "test" }.should raise_error(IndexError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ with_feature :readline do
|
|||
end
|
||||
|
||||
it "raises a TypeError when the passed Object can't be converted to a String" do
|
||||
lambda { Readline::HISTORY.push(mock("Object")) }.should raise_error(TypeError)
|
||||
-> { Readline::HISTORY.push(mock("Object")) }.should raise_error(TypeError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue