Skip to content
This repository
Browse code

trys to add generator spec per pull request #76

  • Loading branch information...
commit fb57b23c71db803cfbf127242a359f009b8d8cdb 1 parent 48e9a95
Ben Mabey authored
1  Gemfile
@@ -17,6 +17,7 @@ gem 'sqlite3-ruby', :require=>'sqlite3'
17 17 #gem 'email_spec', :path => '.'
18 18 gem 'capybara'
19 19 gem 'database_cleaner'
  20 +gem 'ammeter', '~> 0.2.0' # allows you to test rails generators
20 21
21 22 gem "test-unit"
22 23
15 Gemfile.lock
@@ -2,7 +2,6 @@ PATH
2 2 remote: .
3 3 specs:
4 4 email_spec (1.3.0)
5   - autotest
6 5 capybara
7 6 cucumber
8 7 cucumber-rails
@@ -10,9 +9,8 @@ PATH
10 9 database_cleaner
11 10 delayed_job (~> 2.0)
12 11 email_spec
13   - growl-glue
14 12 jeweler
15   - launchy
  13 + launchy (~> 2.1)
16 14 mail
17 15 mail (~> 2.2)
18 16 mimetype-fu
@@ -20,7 +18,6 @@ PATH
20 18 rack-test
21 19 rails (= 3.0.7)
22 20 rake (>= 0.8.7)
23   - rspec (>= 2.0.1)
24 21 rspec (~> 2.0)
25 22 rspec-rails (>= 2.0.1)
26 23 sinatra
@@ -30,7 +27,6 @@ PATH
30 27 GEM
31 28 remote: http://gemcutter.org/
32 29 specs:
33   - ZenTest (4.7.0)
34 30 abstract (1.0.0)
35 31 actionmailer (3.0.7)
36 32 actionpack (= 3.0.7)
@@ -59,9 +55,12 @@ GEM
59 55 activesupport (= 3.0.7)
60 56 activesupport (3.0.7)
61 57 addressable (2.2.7)
  58 + ammeter (0.2.4)
  59 + activesupport (>= 3.0)
  60 + railties (>= 3.0)
  61 + rspec (>= 2.2)
  62 + rspec-rails (>= 2.2)
62 63 arel (2.0.10)
63   - autotest (4.4.6)
64   - ZenTest (>= 4.4.1)
65 64 builder (2.1.2)
66 65 capybara (1.1.2)
67 66 mime-types (>= 1.16)
@@ -97,7 +96,6 @@ GEM
97 96 gherkin (2.9.3)
98 97 json (>= 1.4.6)
99 98 git (1.2.5)
100   - growl-glue (1.0.7)
101 99 highline (1.6.11)
102 100 i18n (0.5.0)
103 101 jeweler (1.8.3)
@@ -185,6 +183,7 @@ PLATFORMS
185 183 ruby
186 184
187 185 DEPENDENCIES
  186 + ammeter (~> 0.2.0)
188 187 capybara
189 188 cucumber
190 189 cucumber-rails
21 spec/generators/steps/steps_generator_spec.rb
... ... @@ -0,0 +1,21 @@
  1 +require 'spec_helper'
  2 +
  3 +# Generators are not automatically loaded by Rails
  4 +require 'generators/email_spec/steps/steps_generator'
  5 +
  6 +describe EmailSpec::StepsGenerator do
  7 + # Tell the generator where to put its output (what it thinks of as Rails.root)
  8 + destination(File.expand_path("../../../../../tmp", __FILE__))
  9 +
  10 + before { prepare_destination }
  11 +
  12 + describe 'no arguments' do
  13 + before { run_generator }
  14 +
  15 + describe 'features/step_definitions/email_steps.rb' do
  16 + subject { file('features/step_definitions/email_steps.rb') }
  17 + it { should exist }
  18 + it { should contain "# Commonly used email steps" }
  19 + end
  20 + end
  21 +end

0 comments on commit fb57b23

Please sign in to comment.
Something went wrong with that request. Please try again.