spec/support/shared_examples.rb in wildcard_matchers-0.1.8 vs spec/support/shared_examples.rb in wildcard_matchers-0.2.0

- old
+ new

@@ -2,26 +2,26 @@ expected = matcher.to_s + (args.size > 0 ? "(#{args.map(&:inspect).join(", ")})" : "") it "#{actual.inspect} with #{expected}" do if matcher.is_a?(Symbol) and WildcardMatchers.respond_to?(matcher) # Note: some symbol comes here and may fail - wildcard_match?(actual, send(matcher, *args), &debugger).should be_true + expect(wildcard_match?(actual, send(matcher, *args), &debugger)).to be true else - wildcard_match?(actual, matcher, &debugger).should be_true + expect(wildcard_match?(actual, matcher, &debugger)).to be true end end end shared_examples_for "not wildcard match" do |actual, matcher, *args| expected = matcher.to_s + (args.size > 0 ? "(#{args.map(&:inspect).join(", ")})" : "") it "#{actual.inspect} with #{expected}" do if matcher.is_a?(Symbol) and WildcardMatchers.respond_to?(matcher) # Note: some symbol comes here and may fail - wildcard_match?(actual, send(matcher, *args), &debugger).should be_false + expect(wildcard_match?(actual, send(matcher, *args), &debugger)).to be false else - wildcard_match?(actual, matcher, &debugger).should be_false + expect(wildcard_match?(actual, matcher, &debugger)).to be false end end end shared_examples_for "wildcard match with helper" do |actual, helper, matcher, *args| @@ -36,11 +36,11 @@ matcher_string) + ")" it "#{actual.inspect} with #{expected}" do if matcher.is_a?(Symbol) and WildcardMatchers.respond_to?(matcher) # Note: some symbol comes here and may fail - wildcard_match?(actual, send(helper, send(matcher, *args)), &debugger).should be_true + expect(wildcard_match?(actual, send(helper, send(matcher, *args)), &debugger)).to be true else - wildcard_match?(actual, send(helper, matcher), &debugger).should be_true + expect(wildcard_match?(actual, send(helper, matcher), &debugger)).to be true end end end