Commit 1216a73

mo k <mo@mokhan.ca>
2012-08-11 04:12:41
add map for cucumber.
1 parent 708b7cd
Changed files (3)
spec
features
spec/features/step_definitions/rover_steps.rb
@@ -0,0 +1,45 @@
+$:.unshift(File.dirname(__FILE__) + '/../../')
+require 'spec_helper'
+
+Before do
+end
+
+After do
+end
+
+Given /the terrain is (.*) by (.*)/ do |x,y|
+  @rover = Rover.new
+end
+When /the starting position is '1 2 N'/ do
+
+end
+When /I move 'LMLMLMLMM'/ do
+
+end
+Then /the result should be '1 3 N' on the screen/ do
+
+end
+
+When /I press play/ do |op|
+  puts 'blah'
+end
+
+
+#Before do
+#@calc = Calculator.new
+#end
+
+#After do
+#end
+
+#Given /I have entered (\d+) into the calculator/ do |n|
+#@calc.push n.to_i
+#end
+
+#When /I press (\w+)/ do |op|
+#@result = @calc.send op
+#end
+
+#Then /the result should be (.*) on the screen/ do |result|
+#@result.should == result.to_f
+#end
spec/features/deploy.feature
@@ -0,0 +1,34 @@
+Feature: Deployment
+  In order to deploy a rover to mars
+  As a deployment guy
+  I want to be able to told the final coordinates
+
+  Scenario Outline: Deploy a rover
+    Given the terrain is 5 by 5
+    And the starting position is '1 2 N'
+    And I move 'LMLMLMLMM'
+    When I press play
+    Then the result should be '1 3 N' on the screen.
+
+    #Examples:
+      #| input_1 | input_2 | button | output |
+      #| 20 | 30 | add | 50 |
+      #| 2 | 5 | add | 7 |
+      #| 0 | 40 | add | 40 |
+
+#Feature: Addition
+  #In order to avoid silly mistakes
+  #As a math idiot
+  #I want to be told the sum of two numbers
+
+  #Scenario Outline: Add two numbers
+    #Given I have entered <input_1> into the calculator
+    #And I have entered <input_2> into the calculator
+    #When I press <button>
+    #Then the result should be <output> on the screen
+
+    #Examples:
+      #| input_1 | input_2 | button | output |
+      #| 20 | 30 | add | 50 |
+      #| 2 | 5 | add | 7 |
+      #| 0 | 40 | add | 40 |
.vimrc
@@ -1,2 +1,3 @@
 map ,t :!rake spec<cr>
 map ,r :!rake run<cr>
+map ,c :!cucumber spec/features<cr>