Bundle and use guard to automatically run specs on FS events
This commit is contained in:
parent
7350c1e17d
commit
4a11073106
4
Gemfile
4
Gemfile
@ -15,4 +15,8 @@ group :development, :test do
|
|||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
gem 'factory_girl_rails'
|
gem 'factory_girl_rails'
|
||||||
gem 'spork', '~> 0.9.0.rc'
|
gem 'spork', '~> 0.9.0.rc'
|
||||||
|
gem 'guard'
|
||||||
|
gem 'guard-rspec'
|
||||||
|
gem 'guard-spork'
|
||||||
|
gem 'rb-inotify'
|
||||||
end
|
end
|
||||||
|
13
Gemfile.lock
13
Gemfile.lock
@ -61,6 +61,13 @@ GEM
|
|||||||
ffi (1.0.9)
|
ffi (1.0.9)
|
||||||
gherkin (2.4.1)
|
gherkin (2.4.1)
|
||||||
json (>= 1.4.6)
|
json (>= 1.4.6)
|
||||||
|
guard (0.6.3)
|
||||||
|
thor (~> 0.14.6)
|
||||||
|
guard-rspec (0.4.4)
|
||||||
|
guard (>= 0.4.0)
|
||||||
|
guard-spork (0.2.1)
|
||||||
|
guard (>= 0.2.2)
|
||||||
|
spork (>= 0.8.4)
|
||||||
haml (3.1.2)
|
haml (3.1.2)
|
||||||
i18n (0.5.0)
|
i18n (0.5.0)
|
||||||
json (1.5.3)
|
json (1.5.3)
|
||||||
@ -93,6 +100,8 @@ GEM
|
|||||||
rdoc (~> 3.4)
|
rdoc (~> 3.4)
|
||||||
thor (~> 0.14.4)
|
thor (~> 0.14.4)
|
||||||
rake (0.9.2)
|
rake (0.9.2)
|
||||||
|
rb-inotify (0.8.6)
|
||||||
|
ffi (>= 0.5.0)
|
||||||
rdoc (3.8)
|
rdoc (3.8)
|
||||||
rspec (2.6.0)
|
rspec (2.6.0)
|
||||||
rspec-core (~> 2.6.0)
|
rspec-core (~> 2.6.0)
|
||||||
@ -132,8 +141,12 @@ DEPENDENCIES
|
|||||||
cucumber-rails
|
cucumber-rails
|
||||||
database_cleaner
|
database_cleaner
|
||||||
factory_girl_rails
|
factory_girl_rails
|
||||||
|
guard
|
||||||
|
guard-rspec
|
||||||
|
guard-spork
|
||||||
haml
|
haml
|
||||||
rails (= 3.0.9)
|
rails (= 3.0.9)
|
||||||
|
rb-inotify
|
||||||
rspec-rails
|
rspec-rails
|
||||||
spork (~> 0.9.0.rc)
|
spork (~> 0.9.0.rc)
|
||||||
sqlite3
|
sqlite3
|
||||||
|
22
Guardfile
Normal file
22
Guardfile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
guard 'spork', :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do
|
||||||
|
watch('config/application.rb')
|
||||||
|
watch('config/environment.rb')
|
||||||
|
watch(%r{^config/environments/.+\.rb$})
|
||||||
|
watch(%r{^config/initializers/.+\.rb$})
|
||||||
|
watch('spec/spec_helper.rb')
|
||||||
|
watch(%r{^spec/support/.+\.rb$})
|
||||||
|
end
|
||||||
|
|
||||||
|
guard 'rspec', :cli => '--drb', :notification => false do
|
||||||
|
watch(%r{^spec/.+_spec\.rb$})
|
||||||
|
|
||||||
|
watch('spec/spec_helper.rb') { 'spec' }
|
||||||
|
watch(%r{^spec/support/.+\.rb$}) { 'spec' }
|
||||||
|
watch('spec/factories.rb') { 'spec' }
|
||||||
|
|
||||||
|
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||||
|
watch(%r{^app/(.+)\.haml$}) { |m| "spec/#{m[1]}.haml_spec.rb" }
|
||||||
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
||||||
|
|
||||||
|
watch('app/controllers/application_controller.rb') { 'spec/controllers' }
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user