forked from cucumber/cucumber-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3f77ec
commit 892a3fa
Showing
12 changed files
with
66 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Manifest | ||
pkg | ||
doc | ||
tmp | ||
tmp | ||
coverage |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,60 @@ | ||
= cucumber-rails | ||
= Cucumber-Rails | ||
|
||
Extracted the Rails generators from the Cucumber gem, inspired by | ||
{this posting}[http://groups.google.com/group/cukes/browse_thread/thread/b9b8ff6301393c19] | ||
on the Cukes Mailing List. | ||
Cucumber-Rails brings Cucumber to Rails2 and Rails3. It contains 2 generators - one | ||
for bootstrapping your Rails app for Cucumber, and a second one for generating features. | ||
|
||
The goal is to provide i18n of the webrat_steps.rb plus some other useful | ||
enhancements. | ||
Cucumber-Rails also contains Cucumber Step Definitions that wrap Capybara or Webrat, | ||
giving you a head start for writing Cucumber features against your Rails app. | ||
|
||
== Install | ||
== Installation | ||
|
||
Add it to the Gemfile as follows: | ||
=== Rails 3: | ||
|
||
gem "cucumber-rails", :git => "[email protected]:alg/cucumber-rails3.git" | ||
Before you can use the generator, add it to your project's Gemfile as follows: | ||
|
||
then: | ||
gem "cucumber-rails" | ||
|
||
gem bundle | ||
Or if you prefer the latest and greatest: | ||
|
||
... and you are ready to go. | ||
gem "cucumber-rails", :git => "[email protected]:aslakhellesoy/cucumber-rails3.git" | ||
|
||
== Usage | ||
Then install the gem by running: | ||
|
||
Once you install the gem, the generators will be available to all Rails | ||
applications on your system. If you run `script/rails generate` (or `script/generate` on Rails 2.x) | ||
without any additional arguments you should see the available generators listed. | ||
bundle install | ||
|
||
To run the generator, go to your rails project directory and call it. | ||
Finally, bootstrap your Rails app by running: | ||
|
||
Rails 3: | ||
ruby script/rails generate cucumber:skeleton | ||
|
||
script/rails generate cucumber:skeleton | ||
=== Rails 2.x: | ||
|
||
Rails 2.x: | ||
|
||
script/generate cucumber | ||
Before you can use the generator, install the gem by running: | ||
|
||
gem install cucumber-rails | ||
|
||
== Included Generators | ||
Finally, bootstrap your Rails app by running: | ||
|
||
Rails 3: | ||
|
||
* cucumber:skeleton -- Sets up Cucumber in your Rails project | ||
* cucumber:feature -- Generates a skeleton for a new feature | ||
script/generate cucumber | ||
|
||
Rails 2: | ||
== Generating a Cucumber feature | ||
|
||
* cucumber -- Sets up Cucumber in your Rails project | ||
* feature -- Generates a skeleton for a new feature | ||
IMPORTANT: Only do this if you are new to Cucumber. We recommend you write your | ||
Cucumber features by hand once you get the hang of it. | ||
|
||
To view the README for each generator, run it with the --help option. | ||
=== Rails 3: | ||
|
||
script/rails generate cucumber:skeleton --help | ||
script/rails generate cucumber:feature --help | ||
Example: | ||
|
||
or for Rails 2.x: | ||
ruby script/rails generate cucumber:feature post title:string body:text published:boolean | ||
ruby script/rails generate scaffold post title:string body:text published:boolean | ||
rake db:migrate | ||
rake cucumber | ||
|
||
script/generate cucumber --help | ||
script/generate feature --help | ||
=== Rails 2: | ||
|
||
== Tests | ||
Example: | ||
|
||
This project has tests, but for practical and historical reasons they live in a different project: | ||
http://github.com/aslakhellesoy/cucumber-rails-test/ | ||
ruby script/generate feature post title:string body:text published:boolean | ||
ruby script/generate scaffold post title:string body:text published:boolean | ||
rake db:migrate | ||
rake cucumber |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.