diff options
Diffstat (limited to 'spec/ruby/core/matchdata/begin_spec.rb')
| -rw-r--r-- | spec/ruby/core/matchdata/begin_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/matchdata/begin_spec.rb b/spec/ruby/core/matchdata/begin_spec.rb index 54b4e0a33f..b4be077ae4 100644 --- a/spec/ruby/core/matchdata/begin_spec.rb +++ b/spec/ruby/core/matchdata/begin_spec.rb @@ -12,7 +12,7 @@ describe "MatchData#begin" do it "returns nil when the nth match isn't found" do match_data = /something is( not)? (right)/.match("something is right") - match_data.begin(1).should be_nil + match_data.begin(1).should == nil end it "returns the character offset for multi-byte strings" do @@ -42,11 +42,11 @@ describe "MatchData#begin" do -> { match_data.begin(-1) - }.should raise_error(IndexError, "index -1 out of matches") + }.should.raise(IndexError, "index -1 out of matches") -> { match_data.begin(3) - }.should raise_error(IndexError, "index 3 out of matches") + }.should.raise(IndexError, "index 3 out of matches") end end @@ -86,7 +86,7 @@ describe "MatchData#begin" do -> { match_data.begin("y") - }.should raise_error(IndexError, "undefined group name reference: y") + }.should.raise(IndexError, "undefined group name reference: y") end end @@ -126,7 +126,7 @@ describe "MatchData#begin" do -> { match_data.begin(:y) - }.should raise_error(IndexError, "undefined group name reference: y") + }.should.raise(IndexError, "undefined group name reference: y") end end end |
