Class: GraphitiContextProxy

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/graphiti_spec_helpers/rspec.rb

Instance Method Summary collapse

Constructor Details

#initialize(proxied, *args) ⇒ GraphitiContextProxy

Returns a new instance of GraphitiContextProxy.


5
6
7
8
# File 'lib/graphiti_spec_helpers/rspec.rb', line 5

def initialize(proxied, *args)
  @__proxied = proxied
  super(*args)
end

Instance Method Details

#current_userObject

variables defined in the rspec context should remain lazy


11
12
13
# File 'lib/graphiti_spec_helpers/rspec.rb', line 11

def current_user
  super || __proxied_current_user
end

#paramsObject


15
16
17
# File 'lib/graphiti_spec_helpers/rspec.rb', line 15

def params
  super || __proxied_params
end