Skip to content
This repository was archived by the owner on Jun 6, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ end

group :development, :test do
gem 'guard-spring'
gem 'guard-bundler'
gem 'guard-migrate'
gem 'rspec-rails'
gem 'factory_girl_rails'
end
Expand Down
18 changes: 18 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
guard 'bundler' do
watch('Gemfile')
end

guard 'migrate' do
watch(%r{^db/migrate/(\d+).+\.rb})
watch('db/seeds.rb')
end

guard 'spring', :rspec_cli => '--color' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^spec/spec_helper\.rb$}) { |m| 'spec' }
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$}) do |m|
%W(spec/routing/#{m[1]}_routing_spec.rb spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb spec/requests/#{m[1]}_spec.rb)
end
end