On 8/20/07, Zach Dennis <[EMAIL PROTECTED]> wrote:
> On 8/20/07, aslak hellesoy <[EMAIL PROTECTED]> wrote:
> > Several problems here:
> >
> > First, rspec_scaffold must be given a *singularised* name, in your
> > case 'product'. (This is Rails being finicky, not RSpec).
>
> ok
>
> > Second, after running rspec_scaffold you must run rake db:migrate
>
> This I didn't do, but doing this makes no difference on the mock model
> error. This does fix the issue if I run the spec from RAILS_ROOT, but
> not if I run the spec from within the spec/views/products directory.

Ah - now THAT makes sense. This won't work on any system at all. RSpec
looks for /spec/views/ in the path to know that it's a view spec. If
you're in the view spec directory, it doesn't get the information it
needs. Make sense?

> > Third, before you can run specs with ruby or spec, you must create the
> > test database. This can be done with rake spec or rake db:test:prepare
>
> The database was already in existence, so I left that part omitted in the 
> video
>
> If I run specs from RAILS_ROOT then everything works, but not if I'm
> not in RAILS_ROOT. This is less of an issue I originally thought, but
> the directory thing is a minor irritation, although I can make sure to
> run specs from the RAILS_ROOT.

We'd have to change how rspec figures out what behaviour_type to use
to reduce the irritation. Any suggestions?

>
> thx,
>
> Zach
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to