summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-07-26 17:45:25 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-07-30 10:39:17 +1000
commit724d7c2ff5f6a5c75c6bab8137a97a0dac6f05ed (patch)
tree8d3eef5af6370d3a522c179d791848cc2423baa0
parent93b3b92d70d2165795378933d9367c76322b9748 (diff)
downloadgitlab-shell-724d7c2ff5f6a5c75c6bab8137a97a0dac6f05ed.tar.gz
Update Guardfile
* Fix lib matcher so it actually runs specs * Strip out only what we need/use
-rw-r--r--Guardfile20
1 files changed, 2 insertions, 18 deletions
diff --git a/Guardfile b/Guardfile
index 421eaf3..2f3a73e 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,23 +1,7 @@
-# A sample Guardfile
# More info at https://github.com/guard/guard#readme
-guard 'rspec' do
+guard :rspec, cmd: 'bundle exec rspec' do
watch(%r{^spec/.+_spec\.rb$})
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
-
- # Rails example
- watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
- watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_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" }
- watch('config/routes.rb') { "spec/routing" }
- watch('app/controllers/application_controller.rb') { "spec/controllers" }
-
- # Capybara features specs
- watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
-
- # Turnip features and steps
- watch(%r{^spec/acceptance/(.+)\.feature$})
- watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end