[rspec-users] running rspec in spec/requests directory with cells fails

Jim Morris wolfmanjm at gmail.com
Wed Dec 22 14:44:51 EST 2010


Yes it works from ROOT as I said in original post :)

However I can run normal request specs from the request directory
itself, if they don't use cells.

Is rspec meant to only run from ROOT?

Also this part of the error message seems suspicious...

and possible paths sidebar/google_searchcell/rails/google_search

Seems to have concatenated two paths into one.

The reason I am asking is because the rspec-mode for emacs runs its
specs from the directory the spec you are testing resides.
I'll need to fix that if rspec is not meant to be run from there.

Thanks


On Dec 22, 5:52 am, David Chelimsky <dchelim... at gmail.com> wrote:
> On Dec 22, 2010, at 2:51 AM, Jim Morris wrote:
>
> > Hi, not exactly sure if this is a cells bug or an rspec (or both), but
> > when running a simple request spec
> > from the spec/requests directory gets an error whereas running it from
> > the RAILS ROOT directory it works..
> > Seems it cannot find the view in the cells directory.
>
> > The full project is inhttps://github.com/wolfmanjm/wolfmanblog_rails.
> > Using rails 3.0.3 and rspec-rails 2.2.1
>
> >> cd spec/request
>
> Try running from the project root instead:
>
> $ rspec spec/requests/basics_spec.rb
>
> or
>
> $ rspec spec/requests
>
> or
>
> $ rake spec:requests
>
> HTH,
> David
>
>
>
> >> rspec basics_spec.rb
>
> > [sequel] Setting up the "test" environment:
> > F
>
> > Failures:
>
> >  1) Basic tests works! (now write some real specs)
> >     Failure/Error: visit "/"
> >     Missing template cell/rails/google_search with
> > {:locale=>[:en, :en], :handlers=>[:haml, :rjs, :rhtml, :rxml, :erb, :builder], :formats=>[:html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json]}
> > in view paths "/home/morris/work/ruby/rails3/wolfmanblog/spec/requests/
> > app/cells", "/home/morris/work/ruby/rails3/wolfmanblog/spec/requests/
> > app/cells/layouts" and possible paths sidebar/google_searchcell/rails/
> > google_search
> >     # /home/morris/work/ruby/rails3/wolfmanblog/app/cells/
> > sidebar_cell.rb:8:in `google_search'
> >     # /home/morris/work/ruby/rails3/wolfmanblog/app/helpers/
> > application_helper.rb:3:in `sidebar'
> >     # /home/morris/work/ruby/rails3/wolfmanblog/app/views/layouts/
> > application.html.haml:34:in
> > `_app_views_layouts_application_html_haml__882586219_84745880_0'
> >     # ./basics_spec.rb:5
>
> > Finished in 0.14442 seconds
> > 1 example, 1 failure
> > _______________________________________________
> > rspec-users mailing list
> > rspec-us... at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/rspec-users
>
> Cheers,
> David
>
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users


More information about the rspec-users mailing list