spec/kernel_spec.rb in re2-0.7.0 vs spec/kernel_spec.rb in re2-1.0.0
- old
+ new
@@ -1,15 +1,13 @@
-require "spec_helper"
-
-describe Kernel do
+RSpec.describe Kernel do
describe "#RE2" do
it "returns an RE2::Regexp instance given a pattern" do
- RE2('w(o)(o)').must_be_instance_of(RE2::Regexp)
+ expect(RE2('w(o)(o)')).to be_a(RE2::Regexp)
end
it "returns an RE2::Regexp instance given a pattern and options" do
re = RE2('w(o)(o)', :case_sensitive => false)
- re.must_be_instance_of(RE2::Regexp)
- re.wont_be(:case_sensitive?)
+ expect(re).to be_a(RE2::Regexp)
+ expect(re).to_not be_case_sensitive
end
end
end