Permalink
Browse files

step definitions defined

  • Loading branch information...
1 parent bf1ebbb commit 51f3e1ba64baba8270049c82ab4b7e8ee0ea6f36 @coreyhaines committed Oct 4, 2009
Showing with 21 additions and 10 deletions.
  1. +10 −10 features/single_number.feature
  2. +11 −0 features/step_definitions/number_to_lcd_steps.rb
@@ -1,7 +1,7 @@
Feature: Generating LCD representation for single numbers
Scenario: Number 1
- When I convert "1" to LCD
+ When I convert the number "1" to LCD
Then I should get the following representation
"""
@@ -11,7 +11,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 2
- When I convert "2" to LCD
+ When I convert the number "2" to LCD
Then I should get the following representation
"""
-
@@ -22,7 +22,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 3
- When I convert "3" to LCD
+ When I convert the number "3" to LCD
Then I should get the following representation
"""
-
@@ -33,7 +33,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 4
- When I convert "4" to LCD
+ When I convert the number "4" to LCD
Then I should get the following representation
"""
@@ -44,7 +44,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 5
- When I convert "5" to LCD
+ When I convert the number "5" to LCD
Then I should get the following representation
"""
-
@@ -55,7 +55,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 6
- When I convert "6" to LCD
+ When I convert the number "6" to LCD
Then I should get the following representation
"""
-
@@ -66,7 +66,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 7
- When I convert "7" to LCD
+ When I convert the number "7" to LCD
Then I should get the following representation
"""
-
@@ -77,7 +77,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 8
- When I convert "8" to LCD
+ When I convert the number "8" to LCD
Then I should get the following representation
"""
-
@@ -88,7 +88,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 9
- When I convert "9" to LCD
+ When I convert the number "9" to LCD
Then I should get the following representation
"""
-
@@ -99,7 +99,7 @@ Feature: Generating LCD representation for single numbers
"""
Scenario: Number 0
- When I convert "0" to LCD
+ When I convert the number "0" to LCD
Then I should get the following representation
"""
-
@@ -0,0 +1,11 @@
+Transform /^the number "([^\"]*)"$/ do |to_convert|
+ to_convert.to_i
+end
+
+When /^I convert (the number "[^\"]*") to LCD$/ do |number|
+ @converted = NumberToLCD.convert(number)
+end
+
+Then /^I should get the following representation$/ do |lcd_representation|
+end
+

0 comments on commit 51f3e1b

Please sign in to comment.