diff options
Diffstat (limited to 'spec/ruby/core/regexp/new_spec.rb')
-rw-r--r-- | spec/ruby/core/regexp/new_spec.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/spec/ruby/core/regexp/new_spec.rb b/spec/ruby/core/regexp/new_spec.rb index ce662b7a4f..65f612df55 100644 --- a/spec/ruby/core/regexp/new_spec.rb +++ b/spec/ruby/core/regexp/new_spec.rb @@ -11,17 +11,9 @@ end describe "Regexp.new given a Regexp" do it_behaves_like :regexp_new_regexp, :new - it_behaves_like :regexp_new_string_binary, :compile + it_behaves_like :regexp_new_string_binary, :new end -describe "Regexp.new given an Integer" do - it "raises a TypeError" do - -> { Regexp.new(1) }.should raise_error(TypeError) - end -end - -describe "Regexp.new given a Float" do - it "raises a TypeError" do - -> { Regexp.new(1.0) }.should raise_error(TypeError) - end +describe "Regexp.new given a non-String/Regexp" do + it_behaves_like :regexp_new_non_string_or_regexp, :new end |