I’m creating a simple blog application, and I am having writers block on where to start using Cucumber to drive my features at a high level.
If I start with the most obvious main page, should I start with something like:
Feature: Reading blogs
In order to read a blog entry
As a user
I want to be able to click on a blog title
Scenerio: Viewing a blog
Given there is a blog title called "abc"
And I am on the homepage
When I follow "abc"
Then I should see "abc"
Now from there I would have to then create the controller, action for index and the blog view page.
Then the models etc.
Then would I need to create sum dummy data somehow? Does cucumber run using my test database?
This is a pretty good initial scenario. From here, you’d probably create a controller and a model (test the model with RSpec; the Cucumber scenario is sufficient for testing the controller). For sample data, you probably want to use Factory Girl, with the possible additions of Pickle and ffaker; Cucumber does run with your test DB. The cucumber-rails gem docs and the Cucumber wiki explain a lot of this.