codegram/spinach — pull request #115 by ywen (2012-08-13 03:05:48+00:00)
Title: Features/before and after hooks

### Puropse

To provide a local before and after hooks for each step class.

### Feature tests

```cucumber
Feature: Before and after hooks
In order to setup and clean the test environment for a single feature
As a developer
I want to be able to use before and after hooks within the step class

Scenario: Happy path
Then I can verify the variable setup in the before hook

Scenario: Inter-dependency - after hook cleans up (after happy path)
Then I can verify the variable setup in the before hook
```

```cucumber
Feature: Before and after hooks inheritance
In order to maintain the super classes' before and after code
As a developer
I want to chain the before and after clocks

Scenario: Happy path
Then I can see the variable setup in the super class before hook
And I can see the variable being overridden in the subclass

Scenario: Inter-dependency - after hook cleans up (after happy path)
Then I can see the variable setup in the super class before hook
And I can see the variable being overridden in the subclass
```