Commit 47f52f3
Changed files (6)
config
features
step_definitions
spec
features
step_definitions
config/cucumber.yml
@@ -0,0 +1,4 @@
+# config/cucumber.yml
+##YAML Template
+---
+default: --no-source --format pretty --require features/step_definitions features
features/step_definitions/rover_steps.rb
@@ -0,0 +1,19 @@
+$:.unshift(File.dirname(__FILE__) + '/../../spec')
+require 'spec_helper'
+
+Given /^the terrain is (.*) by (.*)$/ do |x,y|
+ @rover = Rover.new
+end
+Given "the starting position is '1 2 N'" do
+
+end
+Given /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
features/deploy.feature
@@ -0,0 +1,11 @@
+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.
spec/features/step_definitions/rover_steps.rb
@@ -1,45 +0,0 @@
-$:.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
@@ -1,34 +0,0 @@
-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,3 +1,3 @@
map ,t :!rake spec<cr>
map ,r :!rake run<cr>
-map ,c :!cucumber spec/features<cr>
+map ,c :!cucumber features<cr>