Module: RSpec::Matchers

Defined in:
lib/rspec/graphql_matchers/matchers.rb

Instance Method Summary collapse

Instance Method Details

#accept_argument(expected_argument) ⇒ Object



16
17
18
# File 'lib/rspec/graphql_matchers/matchers.rb', line 16

def accept_argument(expected_argument)
  RSpec::GraphqlMatchers::AcceptArgument.new(expected_argument)
end

#accept_arguments(expected_args) ⇒ Object



20
21
22
# File 'lib/rspec/graphql_matchers/matchers.rb', line 20

def accept_arguments(expected_args)
  RSpec::GraphqlMatchers::AcceptArguments.new(expected_args)
end

#be_of_type(expected) ⇒ Object



12
13
14
# File 'lib/rspec/graphql_matchers/matchers.rb', line 12

def be_of_type(expected)
  RSpec::GraphqlMatchers::BeOfType.new(expected)
end

#have_a_field(field_name) ⇒ Object Also known as: have_field

rubocop:disable Naming/PredicateName



25
26
27
# File 'lib/rspec/graphql_matchers/matchers.rb', line 25

def have_a_field(field_name)
  RSpec::GraphqlMatchers::HaveAField.new(field_name)
end

#have_a_return_field(field_name) ⇒ Object Also known as: have_return_field



35
36
37
# File 'lib/rspec/graphql_matchers/matchers.rb', line 35

def have_a_return_field(field_name)
  RSpec::GraphqlMatchers::HaveAField.new(field_name, :return_fields)
end

#have_an_input_field(field_name) ⇒ Object Also known as: have_input_field



30
31
32
# File 'lib/rspec/graphql_matchers/matchers.rb', line 30

def have_an_input_field(field_name)
  RSpec::GraphqlMatchers::HaveAField.new(field_name, :input_fields)
end

#implement(*interface_names) ⇒ Object

rubocop:enable Naming/PredicateName



41
42
43
# File 'lib/rspec/graphql_matchers/matchers.rb', line 41

def implement(*interface_names)
  RSpec::GraphqlMatchers::Implement.new(interface_names.flatten)
end