Closed zhulik closed 8 years ago
@zhulik you definitely got the problem, the @request && @response
should be filled here: https://github.com/razum2um/lurker/blob/master/lib/lurker/spec_helper/rails.rb#L20 by hooking into ActionDispatch in request specs
for the further help I need an example app or steps to reproduce
@razum2um thanks for answer, i check your link and i found that defined?(ActionDispatch::Integration::Session)
and defined?(ActionController::TestCase::Behavior)
returns nils in your code, but in my specs those constans is correctly defined. Any ideas?
@zhulik what do you mean under "returns nils in your code"? gem itself doesn't require all rails, only active_support and does what stays there: if you use rails, it hooks into it
The solution in position of require 'lurker/spec_helper'
. It should be placed after require 'rspec/rails'
. @razum2um can you add a note to readme?
@zhulik yep, you're right, order matters, will do
@razum2um great, thanks!
Hi!
I trying to use lurker in my project: i put it in my gemfile, install it, then add
require 'lurker/spec_helper'
in my spec_helper and then i wrote request spec:I know, that endpoint on this URL works and return some json array with 200 code, but no schemas was created. So, i try to read luker code and i note it in spy.rb:
Any assumptions? rspec 3.3.2, rails 4.1.13, ruby 2.2.3p173