[rspec-users] Specing Layouts

Daniel N has.sox at gmail.com
Sat Jul 14 23:25:35 EDT 2007


On 7/15/07, David Chelimsky <dchelimsky at gmail.com> wrote:
>
> On 7/14/07, Daniel N <has.sox at gmail.com> wrote:
> > Hi,
> >
> > I've just started to try and spec my application.html.erb layout as one
> of
> > the view specs but it totally barfs.
> >
> > I'm guessing that it's due to the yield statements in the layout.
> >
> > Any clues as to how to proceed?
>
> Backtrace please? Could be any number of things.
>
> >


Sorry,  here it is

......rake aborted!
Command ruby
-I"/Users/dneighman/Documents/Projects/rails_projects/update_to_clippings/vendor/plugins/rspec/lib"
"/Users/dneighman/Documents/Projects/rails_projects/update_to_clippings/vendor/plugins/rspec/bin/spec"
"spec/controllers/books_controller_spec.rb"
"spec/controllers/sessions_controller_spec.rb"
"spec/controllers/users_controller_spec.rb"
"spec/helpers/books_helper_spec.rb" "spec/helpers/sessions_helper_spec.rb"
"spec/helpers/users_helper_spec.rb" "spec/models/book_spec.rb"
"spec/models/user_notifier_spec.rb" "spec/models/user_spec.rb"
"spec/views/books/_detail.html.erb_spec.rb"
"spec/views/books/edit.html.erb_spec.rb"
"spec/views/books/index.html.erb_spec.rb"
"spec/views/books/new.html.erb_spec.rb"
"spec/views/books/new_rjs.html.erb_spec.rb"
"spec/views/books/rjs_index.html.erb_spec.rb"
"spec/views/books/show.html.erb_spec.rb"
"spec/views/layouts/application.html.erb_spec.rb" --options
"/Users/dneighman/Documents/Projects/rails_projects/update_to_clippings/spec/spec.opts"
failed
/Users/dneighman/Documents/Projects/rails_projects/update_to_clippings/vendor/plugins/rspec/lib/spec/rake/spectask.rb:166:in
`define'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:823:in `verbose'
/Users/dneighman/Documents/Projects/rails_projects/update_to_clippings/vendor/plugins/rspec/lib/spec/rake/spectask.rb:138:in
`define'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in
`synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/usr/local/bin/rake:16:in `load'
/usr/local/bin/rake:16

And the test is

require File.dirname(__FILE__) + '/../../spec_helper'

describe "/layouts/application.html.erb" do

  it "should render" do
    render "/layouts/application.html.erb"
  end


end

Cheers
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070715/5d59648f/attachment-0001.html 


More information about the rspec-users mailing list