Module: RSpec::Matchers

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

Instance Method Summary collapse

Instance Method Details

#accept_argument(expected_argument) ⇒ Object



14
15
16
# File 'lib/rspec/graphql_matchers/matchers.rb', line 14

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

#accept_arguments(expected_args) ⇒ Object



18
19
20
# File 'lib/rspec/graphql_matchers/matchers.rb', line 18

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

#be_of_type(expected) ⇒ Object



10
11
12
# File 'lib/rspec/graphql_matchers/matchers.rb', line 10

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

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

rubocop:disable Style/PredicateName



23
24
25
# File 'lib/rspec/graphql_matchers/matchers.rb', line 23

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



33
34
35
# File 'lib/rspec/graphql_matchers/matchers.rb', line 33

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



28
29
30
# File 'lib/rspec/graphql_matchers/matchers.rb', line 28

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

#implement(*interface_names) ⇒ Object



38
39
40
# File 'lib/rspec/graphql_matchers/matchers.rb', line 38

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