diff options
Diffstat (limited to 'spec/ruby/core/matchdata/values_at_spec.rb')
| -rw-r--r-- | spec/ruby/core/matchdata/values_at_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/matchdata/values_at_spec.rb b/spec/ruby/core/matchdata/values_at_spec.rb index 4fd0bfc42a..ba5b0e662c 100644 --- a/spec/ruby/core/matchdata/values_at_spec.rb +++ b/spec/ruby/core/matchdata/values_at_spec.rb @@ -1,6 +1,6 @@ require_relative '../../spec_helper' -describe "Struct#values_at" do +describe "MatchData#values_at" do # Should be synchronized with core/array/values_at_spec.rb and core/struct/values_at_spec.rb # # /(.)(.)(\d+)(\d)/.match("THX1138: The Movie").to_a # => ["HX1138", "H", "X", "113", "8"] @@ -26,7 +26,7 @@ describe "Struct#values_at" do end it "raises RangeError if any element of the range is negative and out of range" do - -> { /(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(-6..3) }.should raise_error(RangeError, "-6..3 out of range") + -> { /(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(-6..3) }.should.raise(RangeError, "-6..3 out of range") end it "supports endless Range" do @@ -34,7 +34,7 @@ describe "Struct#values_at" do end it "supports beginningless Range" do - /(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(0..2).should == ["HX1138", "H", "X"] + /(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(..2).should == ["HX1138", "H", "X"] end it "returns an empty Array when Range is empty" do @@ -71,6 +71,6 @@ describe "Struct#values_at" do it "fails when passed arguments of unsupported types" do -> { /(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(Object.new) - }.should raise_error(TypeError, "no implicit conversion of Object into Integer") + }.should.raise(TypeError, "no implicit conversion of Object into Integer") end end |
