added guard for rspec

This commit is contained in:
Martin Linkhorst
2012-10-24 16:01:39 +02:00
parent 40d099016b
commit ff21667caf
4 changed files with 36 additions and 0 deletions
+1
View File
@@ -67,6 +67,7 @@ group :development do
gem 'bullet'
gem 'letter_opener', '~> 1.0.0'
gem 'rails-dev-tweaks', '~> 0.6.1'
gem 'guard-rspec'
end
group :development, :test do
+11
View File
@@ -106,6 +106,14 @@ GEM
ffi (1.1.5)
gherkin (2.11.5)
json (>= 1.4.6)
guard (1.5.0)
listen (>= 0.4.2)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6)
guard-rspec (2.1.0)
guard (>= 1.1)
rspec (~> 2.11)
hike (1.2.1)
htmldiff (0.0.1)
i18n (0.6.1)
@@ -122,8 +130,10 @@ GEM
addressable
linecache (0.46)
rbx-require-relative (> 0.0.4)
listen (0.5.3)
loofah (1.2.1)
nokogiri (>= 1.4.4)
lumberjack (1.0.2)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -286,6 +296,7 @@ DEPENDENCIES
factory_girl_rails (~> 4.0)
fastercsv (~> 1.5.0)
globalize3!
guard-rspec
htmldiff
jquery-rails
jruby-openssl
+20
View File
@@ -0,0 +1,20 @@
guard :rspec do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
# Turnip features and steps
watch(%r{^spec/acceptance/(.+)\.feature$})
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end
+4
View File
@@ -36,4 +36,8 @@ RSpec.configure do |config|
# the seed, which is printed after each run.
# --seed 1234
config.order = "random"
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
end