Acceptance Testing - Evanto/qna GitHub Wiki
Typical acceptance test:
require 'rails_helper'
on the 1st line of a file- starts with the block
feature "Describe feature", %q{ In order to ... I want to ... } do
like this:
feature "User can view a list of questions", %q{
In order to find a solution,
As a user I want to be able to view a list of questions
} do
end
- create everything you need for the test, like:
given(:user) { create(:user) }
- then write scenarios, start each like this:
scenario 'Authenticated user can do...' do
Formula:4