Created
March 22, 2017 18:00
-
-
Save benphelps/be5deea7a931f61720a6de9d874c381c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/inflector' | |
guard :rspec, cmd: 'WAT=wat spring rspec' + (ENV['DOC_FORMAT'] ? ' --format documentation' : ''), notification: false do | |
watch(%r{^spec/features/.+_spec\.rb$}) | |
watch(%r{^spec/models/.+_spec\.rb$}) | |
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1].singularize}_spec.rb" } | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/features/#{m[1].singularize}_spec.rb" } | |
watch(%r{^app/models/(.+)\.rb$}) { |m| "spec/models/#{m[1]}_spec.rb" } | |
watch(%r{^spec/factories/(.+)_spec\.rb$}) do |m| | |
["app/models/#{m[1].singularize}.rb", "spec/models/#{m[1].singularize}_spec.rb"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment