This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.riverglide.addressservice; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.assertThat; | |
public class PostCode { | |
private static final String VALID_OUTCODE = "\\d[A-Z][A-Z]"; | |
private static final int OUTCODE_LENGTH = 3; | |
private String inCode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Cucumber Book v1 Imperative Steps P91 | |
These are the scenarios from the Cucumber Book showing Imperative vs. Declarative style | |
I think the ideas in the book are great but I think that the examples can go further. | |
# Imperative example from the book | |
Scenario: Redirect user to originally requested page after logging in | |
Given a User "dave" exists with password "secret" | |
And I am not logged in | |
When I navigate to the home page | |
Then I am redirected to the login form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift(File.dirname(__FILE__), ".") | |
require 'rubygems' | |
require 'rspec' | |
module Butler | |
def put_fork_on_the_left_of place | |
place.unshift "fork" | |
place | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift(File.dirname(__FILE__), ".") | |
require 'rubygems' | |
require 'rspec' | |
module Butler | |
def self.extended base | |
base.get_ready | |
end |