[rspec-users] Webrat and Rails 2.3.12

Chris Mear chrismear at gmail.com
Tue Aug 16 02:54:01 EDT 2011

On 9 Aug 2011, at 01:37, Matias wrote:

> Im trying to integrate webrat in a rails 2.3.12:
> I get this OUTPUT:
> 1)
> NoMethodError in 'Campaign in first step testing request'
> undefined method `visit' for
> #<Spec::Rails::Example::ModelExampleGroup::Subclass_1::Subclass_1:0x7f3dbd04f720>
> /home/matias/livechains/branches/test/livechains/spec/models/
> campaign_spec.rb:16:

You're running a model spec here. A model spec is for testing a model class directly, not for simulating requests to your app. If you want to run requests, you need to be writing an integration spec.


More information about the rspec-users mailing list