Skip to content

Instantly share code, notes, and snippets.

@shicholas
Created April 11, 2014 15:02
Show Gist options
  • Save shicholas/10476011 to your computer and use it in GitHub Desktop.
Save shicholas/10476011 to your computer and use it in GitHub Desktop.
Guardfile, whoops
guard :rspec, notification: true, cmd: 'rspec --color --format nested --tty', all_after_pass: true, spec_paths: ["spec/actions", "spec/decorators", "spec/forms", "spec/models", "spec/services"] do
watch(%r{^spec/(actions|decorators|forms|models|services)/.+_spec\.rb$})
watch(%r{^spec/(actions|decorators|forms|models|services)_spec_helper\.rb$}) { |m| "spec/#{m[1]}" }
watch(%r{^spec/support_(actions|decorators|forms|models|services)/(.+)\.rb$}) { |m| "spec/#{m[1]}" }
watch(%r{^app/(actions|decorators|forms|models|services)/(.+)\.rb$}) { |m| "spec/#{m[1]}/#{m[2]}_spec.rb" }
watch('/spec/base_spec_helper.rb') { ["spec/actions", "spec/decorators", "spec/forms", "spec/models", "spec/services"] }
watch(%r{^spec/support_common/(.+)\.rb$}) { ["spec/actions", "spec/decorators", "spec/forms", "spec/models", "spec/services"] }
end
guard :rspec, cmd: 'rspec --color --format nested --tty', spec_path: 'spec/features' do
watch(%r{^spec/features/.+_spec\.rb$})
end
guard 'annotate' do
watch( 'db/schema.rb' )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment