Class: RSpec::GraphqlMatchers::HaveAFieldMatchers::OfType

Inherits:
BeOfType show all
Defined in:
lib/rspec/graphql_matchers/have_a_field_matchers/of_type.rb

Instance Attribute Summary

Attributes inherited from BeOfType

#expected, #sample

Instance Method Summary collapse

Methods inherited from BeOfType

#initialize, #matches?

Constructor Details

This class inherits a constructor from RSpec::GraphqlMatchers::BeOfType

Instance Method Details

#descriptionObject



7
8
9
# File 'lib/rspec/graphql_matchers/have_a_field_matchers/of_type.rb', line 7

def description
  "of type `#{expected}`"
end

#failure_messageObject



11
12
13
# File 'lib/rspec/graphql_matchers/have_a_field_matchers/of_type.rb', line 11

def failure_message
  "#{description}, but it was `#{type_name(sample.type)}`"
end