lib/rspec/graphql_matchers/matchers.rb in rspec-graphql_matchers-0.5 vs lib/rspec/graphql_matchers/matchers.rb in rspec-graphql_matchers-0.6

- old
+ new

@@ -1,9 +1,10 @@ require 'rspec/matchers' require 'rspec/graphql_matchers/be_of_type' require 'rspec/graphql_matchers/accept_arguments' require 'rspec/graphql_matchers/have_a_field' +require 'rspec/graphql_matchers/implement' module RSpec module Matchers def be_of_type(expected) RSpec::GraphqlMatchers::BeOfType.new(expected) @@ -29,7 +30,11 @@ # rubocop:disable Style/PredicateName def have_a_return_field(field_name) RSpec::GraphqlMatchers::HaveAField.new(field_name, :return_fields) end alias have_return_field have_a_return_field + + def implement(*interface_names) + RSpec::GraphqlMatchers::Implement.new(interface_names.flatten) + end end end