It looks to me like the webrat rack adapter is calling @session.last_response which is a rack/test call and should work,
Should I report this on the webrat page or rspec???
So someone is not including the rack test stuff, however still don;t
know why it is failing
I’d get rid of all of that stuff from spec_helper. It was guidance from
a cucumber-rails issue, not an rspec issue, and is unnecessary with
rspec. I’d just re-generate it with “script/rails generate
rspec:install”
I am using the current versions of everything rspec
rspec (2.2.0,)
rspec-core (2.2.1)
rspec-expectations (2.2.0)
rspec-mocks (2.2.0,)
rspec-rails (2.2.0)
webrat (0.7.2)
rails(3.0.3)
webrat is in Gemfile…
group :test, :development do
gem ‘webrat’
gem ‘rspec-rails’
end
My spec is meant to be an integration test and as such is in spec/
requests
I have a pretty simple setup, the full source is here…
Thanks for the help, its odd so many people are having issues with
webrat, should I cross post to their group or is this an rspec/webrat/
rails3 issue?
Thanks for the help, its odd so many people are having issues with
webrat, should I cross post to their group or is this an rspec/webrat/
rails3 issue?
I’m not sure where the issue is yet (most likely rspec), but I was able
to see it by cloning your repo and running the specs.
I was able to get things to work by moving “include Rack::Test::Methods”
into the configure block:
RSpec.configure do |config|
config.include Rack::Test::Methods
…
end
You should not, however, have to do any such thing, so I’ll look into
it and if I can address this in rspec-rails I will and have a bug-fix
release out soon.
I was able to get things to work by moving “include Rack::Test::Methods”
into the configure block:
RSpec.configure do |config|
config.include Rack::Test::Methods
…
end
You should not, however, have to do any such thing, so I’ll look into
it and if I can address this in rspec-rails I will and have a bug-fix
release out soon.
For others reading this, this was fixed. I was on rspec 2.1.0 and all I
had to do was to upgrade to the latest (2.4.0) and no changes from the
vanilla rspec install spec_helper are required to run Webrat.
Hope to save everyone the 40 minutes I spent not realizing a simple
upgrade fixed it
Rob
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.