class Shoulda::Matchers::Graphql::Schema::DefineQueryType

Attributes

query_type[RW]

Public Class Methods

new(query_type) click to toggle source
# File lib/shoulda/matchers/graphql/schema/define_query_type.rb, line 12
def initialize(query_type)
  @query_type = query_type
end

Public Instance Methods

description() click to toggle source
# File lib/shoulda/matchers/graphql/schema/define_query_type.rb, line 25
def description
  "define query type #@query_type"
end
failure_message() click to toggle source
# File lib/shoulda/matchers/graphql/schema/define_query_type.rb, line 21
def failure_message
  "expected Schema to have query type #@query_type, but it was #{subject_query_type}"
end
matches?(subject) click to toggle source
Calls superclass method
# File lib/shoulda/matchers/graphql/schema/define_query_type.rb, line 16
def matches?(subject)
  super(subject)
  subject_query_type == query_type
end
subject_query_type() click to toggle source
# File lib/shoulda/matchers/graphql/schema/define_query_type.rb, line 29
def subject_query_type
  @subject.instance_variable_get("@query_object")
end