diff options
Diffstat (limited to 'spec/ruby/core/regexp/new_spec.rb')
| -rw-r--r-- | spec/ruby/core/regexp/new_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/ruby/core/regexp/new_spec.rb b/spec/ruby/core/regexp/new_spec.rb new file mode 100644 index 0000000000..79210e9a23 --- /dev/null +++ b/spec/ruby/core/regexp/new_spec.rb @@ -0,0 +1,19 @@ +require_relative '../../spec_helper' +require_relative 'shared/new' + +describe "Regexp.new" do + it_behaves_like :regexp_new, :new +end + +describe "Regexp.new given a String" do + it_behaves_like :regexp_new_string, :new + it_behaves_like :regexp_new_string_binary, :new +end + +describe "Regexp.new given a Regexp" do + it_behaves_like :regexp_new_regexp, :new +end + +describe "Regexp.new given a non-String/Regexp" do + it_behaves_like :regexp_new_non_string_or_regexp, :new +end |
