Sha256: e441bb6b475e832a41793ba19560dbe7011f75f4418b1514f4f0780b3d05d02a

Contents?: true

Size: 685 Bytes

Versions: 6

Compression:

Stored size: 685 Bytes

Contents

require 'json'
require 'pp'
require 'active_support/core_ext/string'
require 'active_support/core_ext/hash'
require 'graphiti'

require 'graphiti_spec_helpers/version'
require 'graphiti_spec_helpers/helpers'
require 'graphiti_spec_helpers/node'
require 'graphiti_spec_helpers/errors_proxy'
require 'graphiti_spec_helpers/errors'

module GraphitiSpecHelpers
  def self.included(klass)
    klass.send(:include, Helpers)
  end

  class TestRunner < ::Graphiti::Runner
    def current_user
      nil
    end
  end

  module Sugar
    def d
      jsonapi_data
    end

    def included(type = nil)
      jsonapi_included(type)
    end

    def errors
      jsonapi_errors
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
graphiti_spec_helpers-1.0.beta.1 lib/graphiti_spec_helpers.rb
graphiti_spec_helpers-1.0.alpha.8 lib/graphiti_spec_helpers.rb
graphiti_spec_helpers-1.0.alpha.7 lib/graphiti_spec_helpers.rb
graphiti_spec_helpers-1.0.alpha.6 lib/graphiti_spec_helpers.rb
graphiti_spec_helpers-1.0.alpha.3 lib/graphiti_spec_helpers.rb
graphiti_spec_helpers-1.0.alpha.2 lib/graphiti_spec_helpers.rb