yuki24 / artemis

Ruby GraphQL client on Rails that actually makes you more productive
MIT License
207 stars 14 forks source link

Add an easy way that sets up GraphQL fixtures for Rspec #52

Closed yuki24 closed 5 years ago

yuki24 commented 5 years ago

Something like:

require 'artemis/rspec'

That does:

require 'artemis/test_helper'

module Artemis::SpecHelper
  include Artemis::TestHelper

  def graphql_fixture_path
    ...
  end
end

RSpec.configure do |config|
  config.include Artemis::SpecHelper

  config.before :each do
    graphql_requests.clear
    graphql_responses.clear
  end
end
yuki24 commented 5 years ago

closed by 48d052e9819703f1cefa95fbdb431bd03928f4ed