I am trying to learn Rspec-Cucumber tutorial by referring to "The
Pragmatic Programmers - The Rspec Book". I am on the 4th chapter and
seems to be stuck with an error and not able to move forward.I have
followed exactly as per the tutorial but it is showing the below error
`( in line : output.messages.should include(message))`when I try to run
cucumber feature in my console.
**undefined local variable or method `message' for #<Object:0x9c0c05c>
(NameError)**
My codebreaker_steps.rb file is as follows.
Then /^I should see "([^"]*)"$/ do |arg1|
output.messages.should include(message)
end
class Output
def messages
@messages ||= []
end
def puts(message)
messages << message
end
end
def output
@output ||= Output.new
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/cdd22ee1da1a032980ebe9228afc28f0%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.