Skip to content

Instantly share code, notes, and snippets.

View aslakhellesoy's full-sized avatar
🤠
typing...

Aslak Hellesøy aslakhellesoy

🤠
typing...
View GitHub Profile
Feature: submit guess
The code-breaker submits a guess of four colored
pegs. The mastermind game marks the guess with black
and white "marker" pegs.
For each peg in the guess that matches color
and position of a peg in the secret code, the
mark includes one black peg. For each additional
peg in the guess that matches the color but not
Feature: submit guess
The code-breaker submits a guess of four colored
pegs. The mastermind game marks the guess with black
and white "marker" pegs.
For each peg in the guess that matches color
and position of a peg in the secret code, the
mark includes one black peg. For each additional
peg in the guess that matches the color but not
Given /^I am logged in as "(.+)"$/ do |user|
Given %{a user exists with login "#{user}" and password "thedude"}
Given %{I go to /login"
Given %{I fill in "login" with "#{user}"}
Given %{I fill in "password" with "thedude"}
Given %{I press "Login"}
end
Scenario Outline: Shortcode Generated
describe "Given logged in, Homepage: url(:home)" do
before(:each) do
@rack = request(:home)
login
end
it "allows the user to visit" do
@rack.should be_successful
@rack.body.should == "Welcome"
end