lib/rspec/graphql_matchers/matchers.rb in rspec-graphql_matchers-0.2.0 vs lib/rspec/graphql_matchers/matchers.rb in rspec-graphql_matchers-0.3.0

- old
+ new

@@ -1,17 +1,23 @@ require 'rspec/matchers' require 'rspec/graphql_matchers/be_of_type' require 'rspec/graphql_matchers/accept_arguments' +require 'rspec/graphql_matchers/have_a_field' module RSpec module Matchers def be_of_type(expected) RSpec::GraphqlMatchers::BeOfType.new(expected) end def accept_arguments(expected_args) RSpec::GraphqlMatchers::AcceptArguments.new(expected_args) end - alias accept_argument accept_arguments + + # rubocop:disable Style/PredicateName + def have_a_field(field_name) + RSpec::GraphqlMatchers::HaveAField.new(field_name) + end + alias have_field have_a_field end end