concept line in category rails

appears as: line, lines, Line, The line, lines, The lines
Rails 3 in Action

This is an excerpt from Manning's book Rails 3 in Action.

What you see here is known as a scenario in Cucumber. Under the scenario’s title, the remainder of the lines are called steps, which are read by Cucumber’s parser and matched to step definitions, where the logic is kept. Scenarios are found inside a feature, which is a collection of common scenarios. For example, you may have one feature for dictating what happens when a user creates projects and another for when a user creates tickets.

Notice the keywords Given, And, When, and Then. These are just some of the keywords that Cucumber looks for to indicate that a line is a step. If you’re going to be using the same keyword on a new line, it’s best practice to instead use the And keyword because it reads better. Try reading the first two lines aloud from the previous listing, then replace the And with Given and try it again. It just sounds right to have an And there rather than a Given.

Showing /[path to ticketee]/app/views/projects/index.html.erb
 where line #5
 raised:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.

You’re now going to render this partial underneath the “Created by” line on app/views/tickets/show.html.erb using the following line:

Let’s add these states to your db/seeds.rb file by using the lines shown in the following listing.