lib/rspec/graphql_matchers/matchers.rb in rspec-graphql_matchers-1.3.0 vs lib/rspec/graphql_matchers/matchers.rb in rspec-graphql_matchers-1.3.1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'rspec/matchers'
require 'rspec/graphql_matchers/be_of_type'
require 'rspec/graphql_matchers/accept_arguments'
require 'rspec/graphql_matchers/accept_argument'
require 'rspec/graphql_matchers/have_a_field'
@@ -11,17 +13,17 @@
RSpec::GraphqlMatchers::BeOfType.new(expected)
end
def accept_argument(expected_argument)
RSpec::GraphqlMatchers::AcceptArgument.new(expected_argument)
- end
+ end
def accept_arguments(expected_args)
RSpec::GraphqlMatchers::AcceptArguments.new(expected_args)
end
- # rubocop:disable Style/PredicateName
+ # rubocop:disable Naming/PredicateName
def have_a_field(field_name)
RSpec::GraphqlMatchers::HaveAField.new(field_name)
end
alias have_field have_a_field
@@ -32,9 +34,10 @@
def have_a_return_field(field_name)
RSpec::GraphqlMatchers::HaveAField.new(field_name, :return_fields)
end
alias have_return_field have_a_return_field
+ # rubocop:enable Naming/PredicateName
def implement(*interface_names)
RSpec::GraphqlMatchers::Implement.new(interface_names.flatten)
end
end