Sha256: 8d6ec30682e169ea45065e492ad9fc05f47741cec57e18e7d62c87c76f0c052a
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
# 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' require 'rspec/graphql_matchers/implement' module RSpec module Matchers def be_of_type(expected) RSpec::GraphqlMatchers::BeOfType.new(expected) end def accept_argument(expected_argument) RSpec::GraphqlMatchers::AcceptArgument.new(expected_argument) end def accept_arguments(expected_args) RSpec::GraphqlMatchers::AcceptArguments.new(expected_args) end # rubocop:disable Naming/PredicateName def have_a_field(field_name) RSpec::GraphqlMatchers::HaveAField.new(field_name) end alias have_field have_a_field def have_an_input_field(field_name) RSpec::GraphqlMatchers::HaveAField.new(field_name, :arguments) end alias have_input_field have_an_input_field def have_a_return_field(field_name) RSpec::GraphqlMatchers::HaveAField.new(field_name) 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-graphql_matchers-2.0.0.pre.rc.0 | lib/rspec/graphql_matchers/matchers.rb |