Instantly share code, notes, and snippets.

Jordan Crawford jordancrawfordnz

View GitHub Profile
@jordancrawfordnz
jordancrawfordnz / Cloud tinc.conf
Last active Aug 26, 2017
tinc configuration for a computer at home and in the cloud
View Cloud tinc.conf
Name = cloud
AddressFamily = ipv4
Interface = tun0
@jordancrawfordnz
jordancrawfordnz / claiming_routes.feature
Created Apr 1, 2017
An example of a Cucumber feature for Ticket to Ride.
View claiming_routes.feature
Scenario: The player uses their turn to claim a route and the route appears as claimed.
Given a game with 5 players is setup
And the player has 5 train pieces
And the player has 5 "Hopper" train cars
And the player navigates to the game page
When the player clicks the claim route button on a route between "Vancouver" and "Calgary"
And the player selects 3 "Hopper" train cars
And the player clicks the "Claim Route" button
Then the player is on the game page
And the player sees the route from "Vancouver" to "Calgary" claimed with their name
View claim_route_controller_spec.rb
context "on ClaimRoute failure" do
let(:service_double) { instance_double(ClaimRoute, call: service_result, errors: service_expected_errors) }
let(:service_result) { false }
let(:service_expected_errors) { [ClaimRoute::REQUIRED_PARAMETERS_NOT_PROVIDED] }
before do
post_claim_route
end
it "redirects to the game page" do