Posting a Message

To implement our second step, we’re going to cheat again and simulate the posting of a message by calling the models directly. This allows us to focus on building the messages page without getting too distracted. Let’s implement the second step definition:

Joe asks:
Joe asks:
When Do I Use the UI and When Do I Use Models Directly to Create Records?

A Given means that something has happened in the past. If a Given describes stuff that should be in the database, it is usually preferable to create those records directly using the database (ActiveRecord)—without going through the UI. This gives us the freedom to implement certain functionality ...

Get The Cucumber Book now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.