Created
October 26, 2011 00:12
-
-
Save krainboltgreene/1314883 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'coulda' | |
Feature 'Division' do | |
To 'avoid silly mistakes' | |
A 'cashier' | |
Should 'be able to calculate a fraction' | |
def calculator_on | |
Calculator.new | |
end | |
Scenario 'Regular numbers' do | |
Given 'the calculator is turned on' do | |
calculator_on | |
end | |
When 'I have enter a complete equation' do | |
@calculator.stack << 3 | |
@calculator.stack << 3 | |
end | |
Then 'I should have the total be 1' do | |
# @calculator.total.should be 1 | |
# assert_equal @calculator.total, 1 | |
end | |
end | |
Scenario 'Irregular numbers' # Without a block, it's pending | |
Scenario 'Fractional numbers' do | |
Given 'this is a pending given' | |
When 'this is a pending when' | |
Then 'this is a pending then' | |
end | |
Scenario 'User Authentication' do | |
extend ApplicationSteps | |
extend AccountsSteps | |
Given { on_home_page } | |
When { user_clicks('login'); user_enters_login } | |
Then { should_be_on "user/dashboard" } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment