Created
February 9, 2010 16:09
-
-
Save dreamr/299354 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Dream Resource Generation | |
In order to develop outside-in quickly | |
As a rails developer | |
I want to generate a restful resource and specs quickly | |
Scenario: Developer calls dream_resource with: user email:string | |
Given I have a new rails app | |
When I run the dream_resource generator with: user, args: "email:string" | |
Then the "user" controller should contain actions: | |
|action | | |
|index | | |
|new | | |
|create | | |
|show | | |
|edit | | |
|update | | |
|destroy| | |
And the "user" controller should use a before_filter for actions: | |
|action | | |
|show | | |
|edit | | |
|update | | |
|destroy| | |
Scenario: Developer calls dream_resource with: user email:string index new create show | |
Given I have a new rails app | |
When I run the dream_resource generator with: user, args: "email:string index new create show" | |
Then the "user" controller should contain actions: | |
|action| | |
|index | | |
|new | | |
|create| | |
|show | | |
And the "user" controller should not contain actions: | |
|action | | |
|edit | | |
|update | | |
|destroy| | |
And the "user" controller should use a before_filter for actions: | |
|action | | |
|show | | |
Scenario: Developer calls dream_resource with: user email:string index | |
Given I have a new rails app | |
When I run the dream_resource generator with: user, args: "email:string index" | |
Then the "user" controller should contain actions: | |
|action| | |
|index | | |
And the "user" controller should not contain actions: | |
|action | | |
|new | | |
|create | | |
|show | | |
|edit | | |
|update | | |
|destroy| | |
And the "user" controller should not contain a before_filter | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment