Skip to content

Instantly share code, notes, and snippets.

@kwappa
Created June 21, 2012 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwappa/2964058 to your computer and use it in GitHub Desktop.
Save kwappa/2964058 to your computer and use it in GitHub Desktop.
guard-rspec, guard-spork, guard-livereload を使うための最低限のGuardfileをメモっておく
# https://github.com/guard/guard-rspec
guard 'rspec', :version => 2, :all_after_pass => false, :all_on_start => false, :cli => '--color --format nested --fail-fast --drb' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
# https://github.com/guard/guard-spork
guard 'spork', :rspec_env => { 'PADRINO_ENV' => 'test' } do
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
end
# https://github.com/guard/guard-livereload
guard 'livereload', :apply_js_live => false do
watch(%r{public/.+\.js})
watch(%r{spec/javascripts/.+\.js})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment