January 2012
Intermediate to advanced
336 pages
8h 12m
English
We haven’t defined our user association on the Message model yet. Let’s do that:
| rails/08/app/models/message.rb | |
| | class Message < ActiveRecord::Base |
| | belongs_to :user |
| | attr_accessible :content, :user_id |
| | end |
Cucumber now outputs this:
| | Feature: See Messages |
| | |
| | Scenario: See another user's messages |
| | Given there is a User |
| | And the User has posted the message "this is my message" |
| | When I visit the page for the User |
| | Undefined step: "I visit the page for the User" (Cucumber::Undefined) |
| | features/see_messages.feature:5 |
| | Then I should see "this is my message" |
| | Undefined step: "I should see "this is my message"" (Cucumber::Undefined) |
| | features/see_messages.feature:6 |
| | |
| | 1 scenario (1 undefined) |
| | 4 steps ... |
Read now
Unlock full access