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