Skip to content

Commit

Permalink
Version1
Browse files Browse the repository at this point in the history
Ignore the change to AppKernel which was again me thinking of the
framework when I shouldn't have been.

I've added my first feature file. It contains some examples of how the
feature 'navigating the house' would work. Looking back, I'm now
thinking this should be broken up. So, enter the house is a feature and
the scenarios should contain examples of that. Overall though, you get
the idea.

This file is the kind of thing that would derive from the conversation
with the client. No code, just language.
  • Loading branch information
jenkoian committed Jan 20, 2015
1 parent ba11606 commit f5a9511
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public function registerBundles()
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Tabbi89\CommanderBundle\Tabbi89CommanderBundle(),

// House Bundles
new Jenko\HouseBundle\JenkoHouseBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
31 changes: 31 additions & 0 deletions features/navigating-house.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@home-owner @potential-buyer
Feature: Navigating the house

Scenario: Entering the house
Given I am outside of the house
When I enter through the front door
Then I should be in the "hallway"

Scenario: Getting room info
Given I am in the "hallway"
When I request room info
Then I should have room size and adjacent rooms

Scenario: Leaving the house
Given I am in the "hallway"
When I leave through the front door
Then I should be in the "front garden"

Scenario: Entering a room that doesn't exist
Given I am in the "hallway"
Then I should not be able to enter the "made up" room

Scenario: Enter a room that does exist
Given there are the following locations in the house
| name | type | width | height |
| front garden | garden | 300 | 300 |
| hallway | room | 300 | 300 |
| living room | room | 300 | 300 |
| kitchen | room | 300 | 300 |
And I am in the "hallway"
Then I should be able to enter the "living room" room

0 comments on commit f5a9511

Please sign in to comment.