Permalink
Browse files

Add guard for testing.

  • Loading branch information...
1 parent e6ce57a commit 6134721032a6340c2bd2ac397e93603aab829c1e @gmanley committed Jan 8, 2012
Showing with 38 additions and 1 deletion.
  1. +6 −1 Gemfile
  2. +15 −0 Gemfile.lock
  3. +17 −0 Guardfile
View
@@ -30,6 +30,10 @@ gem 'fog'
group :development do
gem 'itslog'
gem 'guard'
+ gem 'guard-rspec'
+ gem 'guard-spork'
+ gem 'rb-fsevent', :require => false # Only works on mac
+ gem 'growl' # install growlnotify (http://growl.info/extras.php#growlnotify)
end
group :test do
@@ -40,10 +44,11 @@ group :test do
end
group :development, :test do
- gem 'rspec-rails', '~> 2.8.0.rc'
+ gem 'rspec-rails', '~> 2.8.0.rc'
gem 'fabrication'
gem 'ffaker'
gem 'spork', '~> 0.9.0.rc'
+ gem 'launchy'
end
# Unccomment this and run bundle if you need to run the importer.
View
@@ -78,6 +78,7 @@ GEM
activesupport (3.2.0.rc2)
i18n (~> 0.6)
multi_json (~> 1.0)
+ addressable (2.2.6)
arel (3.0.0.rc1)
bcrypt-ruby (3.0.1)
bson (1.5.2)
@@ -134,9 +135,15 @@ GEM
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.1)
+ growl (1.0.3)
guard (0.10.0)
ffi (>= 0.5.0)
thor (~> 0.14.6)
+ guard-rspec (0.6.0)
+ guard (>= 0.10.0)
+ guard-spork (0.5.0)
+ guard (>= 0.10.0)
+ spork (>= 0.8.4)
haml (3.1.4)
haml-rails (0.3.4)
actionpack (~> 3.0)
@@ -148,6 +155,8 @@ GEM
itslog (0.6.1)
journey (1.0.0.rc4)
json (1.6.4)
+ launchy (2.0.5)
+ addressable (~> 2.2.6)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -188,6 +197,7 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
+ rb-fsevent (0.4.3.1)
rdoc (3.12)
json (~> 1.4)
rspec (2.8.0)
@@ -253,16 +263,21 @@ DEPENDENCIES
fabrication
ffaker
fog
+ growl
guard
+ guard-rspec
+ guard-spork
haml-rails
itslog
jquery-rails!
kaminari!
+ launchy
mini_magick!
mongoid!
mongoid-rspec!
mongoid_slug
rails (~> 3.2.0.rc2)
+ rb-fsevent
rspec-rails (~> 2.8.0.rc)
sass-rails (~> 3.2.3)
spork (~> 0.9.0.rc)
View
@@ -0,0 +1,17 @@
+guard 'spork', :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' }, :notify => true, :wait => 30 do
+ watch('spec/spec_helper.rb')
+end
+
+guard 'rspec', :version => 2, :cli => '--color --drb --format documentation', :all_after_pass => false, :keep_failed => false, :notify => true do
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+end

0 comments on commit 6134721

Please sign in to comment.