Permalink
Browse files

trys to add generator spec per pull request #76

  • Loading branch information...
1 parent 48e9a95 commit fb57b23c71db803cfbf127242a359f009b8d8cdb @bmabey bmabey committed Apr 8, 2012
Showing with 29 additions and 8 deletions.
  1. +1 −0 Gemfile
  2. +7 −8 Gemfile.lock
  3. +21 −0 spec/generators/steps/steps_generator_spec.rb
View
@@ -17,6 +17,7 @@ gem 'sqlite3-ruby', :require=>'sqlite3'
#gem 'email_spec', :path => '.'
gem 'capybara'
gem 'database_cleaner'
+gem 'ammeter', '~> 0.2.0' # allows you to test rails generators
gem "test-unit"
View
@@ -2,25 +2,22 @@ PATH
remote: .
specs:
email_spec (1.3.0)
- autotest
capybara
cucumber
cucumber-rails
cucumber-sinatra
database_cleaner
delayed_job (~> 2.0)
email_spec
- growl-glue
jeweler
- launchy
+ launchy (~> 2.1)
mail
mail (~> 2.2)
mimetype-fu
pony
rack-test
rails (= 3.0.7)
rake (>= 0.8.7)
- rspec (>= 2.0.1)
rspec (~> 2.0)
rspec-rails (>= 2.0.1)
sinatra
@@ -30,7 +27,6 @@ PATH
GEM
remote: http://gemcutter.org/
specs:
- ZenTest (4.7.0)
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (= 3.0.7)
@@ -59,9 +55,12 @@ GEM
activesupport (= 3.0.7)
activesupport (3.0.7)
addressable (2.2.7)
+ ammeter (0.2.4)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (>= 2.2)
+ rspec-rails (>= 2.2)
arel (2.0.10)
- autotest (4.4.6)
- ZenTest (>= 4.4.1)
builder (2.1.2)
capybara (1.1.2)
mime-types (>= 1.16)
@@ -97,7 +96,6 @@ GEM
gherkin (2.9.3)
json (>= 1.4.6)
git (1.2.5)
- growl-glue (1.0.7)
highline (1.6.11)
i18n (0.5.0)
jeweler (1.8.3)
@@ -185,6 +183,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ ammeter (~> 0.2.0)
capybara
cucumber
cucumber-rails
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+# Generators are not automatically loaded by Rails
+require 'generators/email_spec/steps/steps_generator'
+
+describe EmailSpec::StepsGenerator do
+ # Tell the generator where to put its output (what it thinks of as Rails.root)
+ destination(File.expand_path("../../../../../tmp", __FILE__))
+
+ before { prepare_destination }
+
+ describe 'no arguments' do
+ before { run_generator }
+
+ describe 'features/step_definitions/email_steps.rb' do
+ subject { file('features/step_definitions/email_steps.rb') }
+ it { should exist }
+ it { should contain "# Commonly used email steps" }
+ end
+ end
+end

0 comments on commit fb57b23

Please sign in to comment.