Hi,
I am stuck at the following. Can anyone help.
I am writting a spec for views.
home/index_html_haml_rspec.rb
require 'spec_helper'
describe "home/index.html.haml" do
include Devise::TestHelpers
login_user
it "should display header with search form" do
render :handlers => "home/index.html.haml"
response.should contain("Hello world!" )
end
# pending "add some examples to (or delete) #{__FILE__}"
end
output:
/spec/views/home/index.html.haml_spec.rb:7:in `block in <top
(required)>': undefined local variable or method `login_user' for
#<Class:0xa07074c> (NameError)
from
/usr/local/rvm/gems/ruby-1.9.3-p374@affluence-connect/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:238:in
`module_eval'
from
/usr/local/rvm/gems/ruby-1.9.3-p374@affluence-connect/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:238:in
`subclass'
from
/usr/local/rvm/gems/ruby-1.9.3-p374@affluence-connect/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:224:in
`describe'
from
/usr/local/rvm/gems/ruby-1.9.3-p374@affluence-connect/gems/rspec-core-2.11.1/lib/rspec/core/dsl.rb:18:in
`describe'
from
/home/seneca/ashish/affluence2-staging/spec/views/home/index.html.haml_spec.rb:4:in
`<top (required)>'
from
/usr/local/rvm/gems/ruby-1.9.3-p374@affluence-connect/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in
`load'
from
/usr/local/rvm/gems/ruby-1.9.3-p374@affluence-connect/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in
`block in load_spec_files'
--
Posted via
http://www.ruby-forum.com/.