Skip to content

Commit

Permalink
Cleaned up basic book steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaguery committed May 23, 2012
1 parent af087bf commit 864ed7a
Show file tree
Hide file tree
Showing 19 changed files with 94 additions and 420 deletions.
59 changes: 0 additions & 59 deletions features/acceptance_tests.feature

This file was deleted.

26 changes: 0 additions & 26 deletions features/branching.feature

This file was deleted.

45 changes: 0 additions & 45 deletions features/claw_movement.feature

This file was deleted.

30 changes: 0 additions & 30 deletions features/conditional_tokens.feature

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter1 claw
Feature: Cargo-bot emulator claw

Background: a bot exists
Given I have a new cargobot
Expand All @@ -16,7 +16,7 @@ Scenario: Empty claw picks up crates
And the claw is over pallet 1
When I activate the cargobot
Then the claw should be over pallet 2
And the claw should hold a red box
And the claw should hold a red crate
And the pallets should be [[blue],[]]

Scenario: Claw with crate sets it down
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter 1 conditionals
Feature: Cargo-bot emulator conditionals

Background: a bot exists
Given I have a new cargobot
Expand Down Expand Up @@ -27,4 +27,4 @@ Scenario: 'none' filters
And the pallets are [[],[red],[],[blue,red]]
When I activate the cargobot
Then the pallets should be [[red], [], [], [blue,red]]
And the claw will not be crashed
And the claw should not be crashed
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter 1 crashing
Feature: Cargo-bot emulator crashing

Background: a bot exists
Given I have a new cargobot
Expand All @@ -8,15 +8,15 @@ Scenario: Crash when hitting left wall
And the pallets are [[], [], []]
And the claw is in position 1
When I activate the cargobot
Then the claw should be in position 1
Then the claw should be over pallet 1
And the step count should be 1
And the claw will be crashed
And the claw should be crashed

Scenario: Crash when hitting right wall
Given subroutine 1 is "R R R R"
And the pallets are [[], [], []]
And the claw is in position 1
When I activate the cargobot
Then the claw should be in position 3
Then the claw should be over pallet 3
And the step count should be 3
And the claw will be crashed
And the claw should be crashed
24 changes: 24 additions & 0 deletions features/emulator/loading.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Feature: Cargo-bot emulator loading scripts

Background: a bot exists
Given I have a new cargobot

Scenario: Start with subroutine 1
Given the script is "L R R R"
When I load the script into the bot
Then subroutine 1 should be "L R R R"
And subroutine 2 should be empty

Scenario: Add tokens as indicated by prog_N
Given the script is "R prog_2 L prog_1 R prog_4 L"
When I load the script into the bot
Then subroutine 1 should be "R R"
And subroutine 2 should be "L"
And subroutine 3 should be empty
And subroutine 4 should be "L"

Scenario: Return to subroutine as indicated
Given the script is "R prog_2 L L L L prog_1 R R"
When I load the script into the bot
Then subroutine 1 should be "R R R"
And subroutine 2 should be "L L L L"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter 1 solving
Feature: Cargo-bot emulator solving

Background: a bot exists
Given I have a new cargobot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter 1 subroutines
Feature: Cargo-bot emulator subroutines

Background: a bot exists
Given I have a new cargobot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter 1 crashing
Feature: Cargo-bot emulator toppling

Background: a bot exists
Given I have a new cargobot
Expand All @@ -8,6 +8,6 @@ Scenario: Stacks topple when brushed
And the pallets are [[],[red,red,red,red,red,red,red],[]]
And the claw is in position 1
When I activate the cargobot
Then the claw should be in position 2
Then the claw should be over pallet 2
And the step count should be 1
And a stack of crates will be toppled
And a stack of crates should be toppled
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Chapter1 claw
Feature: Cargo-bot emulator tutorial examples

Background: a bot exists
Given I have a new cargobot
Expand All @@ -9,27 +9,27 @@ Scenario: Tutorial 1
And the goal is [[], [yellow]]
When I activate the cargobot
Then the pallets should be [[], [yellow]]
And the number of steps should be 3
And the number of crashes should be 0
And the number of topples should be 0
And the step count should be 3
And the claw should not be crashed
And no stacks should be toppled

Scenario: Tutorial 2
Given subroutine 1 is "claw R R R claw"
And the pallets are [[yellow],[],[],[]]
And the goal is [[],[],[],[yellow]]
When I activate the cargobot
Then the pallets should be [[],[],[],[yellow]]
And the number of steps should be 5
And the number of crashes should be 0
And the number of topples should be 0

And the step count should be 5
And the claw should not be crashed
And no stacks should be toppled
Scenario: Tutorial 4
Given subroutine 1 is "call2 call2 call2 call2 R call1"
And subroutine 2 is "claw R claw L"
And the pallets are [[blue,red,green,yellow],[],[],[],[],[]]
And the goal is [[],[],[],[],[],[yellow,green,red,blue]]
When I activate the cargobot
Then the pallets should be [[],[],[],[],[],[yellow,green,red,blue]]
And the number of steps should be 107
And the number of crashes should be 0
And the number of topples should be 0
And the step count should be 107
And the claw should not be crashed
And no stacks should be toppled
26 changes: 0 additions & 26 deletions features/loading_script.feature

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 864ed7a

Please sign in to comment.