1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-07-27 12:40:09 +02:00
parent a06301b103
commit 5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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