OSDN Git Service

Add missing test cases found by SimpleCov
[sharp4k/CUTEn.git] / CutenServer / Guardfile
1 # A sample Guardfile
2 # More info at https://github.com/guard/guard#readme
3
4 guard 'spork', :test_unit_env => { 'RAILS_ENV' => 'test' } do
5   watch('config/application.rb')
6   watch('config/environment.rb')
7   watch('config/environments/test.rb')
8   watch(%r{^config/initializers/.+\.rb$})
9   watch('Gemfile')
10   watch('Gemfile.lock')
11   watch('test/test_helper.rb') { :test_unit }
12 end
13
14 guard 'minitest', :drb => true do
15   # with Minitest::Unit
16   #watch(%r|^test/(.*)\/?test_(.*)\.rb|)
17   #watch(%r|^lib/(.*)([^/]+)\.rb|)     { |m| "test/#{m[1]}test_#{m[2]}.rb" }
18   watch(%r|^test/test_helper\.rb|)    { "test" }
19
20   # Rails 3.2
21   watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/functional/#{m[1]}_test.rb" }
22   watch(%r|^app/helpers/(.*)\.rb|)     { |m| "test/helpers/#{m[1]}_test.rb" }
23   watch(%r|^app/models/(.*)\.rb|)      { |m| "test/unit/#{m[1]}_test.rb" }
24
25   watch(%r!^test/.+/.+_test\.rb!)
26   watch(%r!^test/(.+)_test_helper.rb!) { |m| "test/#{m[1]}" }
27
28   # For factory_girl
29   require 'active_support/inflector'
30   watch(%r!^test/factories/(.+)\.rb$!) do |m|
31     %W[
32       test/unit/#{m[1].singularize}_test.rb
33       test/functional/#{m[1]}_controller_test.rb
34     ]
35   end
36 end
37
38 # vim: set ft=ruby: