Browse Source

Utilisation de minitest avec guard

recurrent
echarp 8 years ago
parent
commit
e32e58a58a
  1. 2
      Gemfile
  2. 9
      Gemfile.lock
  3. 28
      Guardfile

2
Gemfile

@ -54,5 +54,5 @@ gem 'compass-rails', "~> 2.0.alpha.0"
group :development do
gem 'guard-livereload'
gem 'guard-bundler'
gem 'guard-test'
gem 'guard-minitest'
end

9
Gemfile.lock

@ -102,9 +102,9 @@ GEM
em-websocket (~> 0.5)
guard (~> 2.0)
multi_json (~> 1.8)
guard-test (2.0.3)
guard-minitest (2.1.2)
guard (~> 2.0)
test-unit (~> 2.2)
minitest (>= 3.0)
haml (4.0.4)
tilt
haml-rails (0.4)
@ -145,7 +145,7 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.2)
mysql2 (0.3.14)
@ -206,7 +206,6 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
test-unit (2.5.5)
thor (0.18.1)
thread_safe (0.1.3)
atomic
@ -235,7 +234,7 @@ DEPENDENCIES
font-awesome-rails
guard-bundler
guard-livereload
guard-test
guard-minitest
haml-rails
jbuilder
jquery-rails

28
Guardfile

@ -1,18 +1,6 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard :test do
watch(%r{^test/.+_test\.rb$})
watch('test/test_helper.rb') { 'test' }
# Rails 4
watch(%r{^app/(.+)\.rb}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^app/controllers/application_controller\.rb}) { 'test/controllers' }
watch(%r{^app/controllers/(.+)_controller\.rb}) { |m| "test/integration/#{m[1]}_test.rb" }
watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
watch(%r{^lib/(.+)\.rb}) { |m| "test/lib/#{m[1]}_test.rb" }
end
guard :livereload do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
@ -21,3 +9,19 @@ guard :livereload do
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard :minitest do
# with Minitest::Unit
watch(%r{^test/(.*)\/?test_(.*)\.rb})
watch(%r{^lib/(.*/)?([^/]+)\.rb}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r{^test/test_helper\.rb}) { 'test' }
# Rails 4
watch(%r{^app/(.+)\.rb}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^app/controllers/application_controller\.rb}) { 'test/controllers' }
watch(%r{^app/controllers/(.+)_controller\.rb}) { |m| "test/integration/#{m[1]}_test.rb" }
watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
watch(%r{^lib/(.+)\.rb}) { |m| "test/lib/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb})
watch(%r{^test/test_helper\.rb}) { 'test' }
end

Loading…
Cancel
Save