stop duplicate minitest runs

This commit is contained in:
Mark Moser 2016-09-22 09:07:06 -05:00
parent 7774a1e3f2
commit 47d7188a2f
4 changed files with 21 additions and 14 deletions

20
Gemfile
View File

@ -33,26 +33,30 @@ group :development do
end end
group :development, :test do group :development, :test do
gem 'awesome_print' gem 'spring'
gem 'binding_of_caller' gem 'spring-watcher-listen', '~> 2.0.0'
gem 'brakeman' gem 'listen'
gem 'byebug', platform: :mri
gem 'guard' gem 'guard'
gem 'guard-brakeman' gem 'guard-brakeman'
gem 'guard-livereload' gem 'guard-livereload'
gem 'guard-minitest' gem 'guard-minitest'
gem 'guard-rubocop' gem 'guard-rubocop'
gem 'guard-shell' gem 'guard-shell'
gem 'listen', '~> 3.0'
gem 'minitest-reporters' gem 'minitest-reporters'
gem 'rails-controller-testing'
gem 'policy-assertions' gem 'policy-assertions'
gem 'byebug', platform: :mri
gem 'pry-byebug' gem 'pry-byebug'
gem 'pry-rails' gem 'pry-rails'
gem 'rails-controller-testing' gem 'binding_of_caller'
gem 'awesome_print'
gem 'rubocop', '~> 0.42.0' gem 'rubocop', '~> 0.42.0'
gem 'simplecov', require: false gem 'simplecov', require: false
gem 'spring' gem 'brakeman'
gem 'spring-watcher-listen', '~> 2.0.0'
end end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem # Windows does not include zoneinfo files, so bundle the tzinfo-data gem

View File

@ -309,7 +309,7 @@ DEPENDENCIES
jbuilder (~> 2.6) jbuilder (~> 2.6)
jquery-rails jquery-rails
json (~> 2.0.2) json (~> 2.0.2)
listen (~> 3.0) listen
mailjet (~> 1.3.8) mailjet (~> 1.3.8)
minitest-reporters minitest-reporters
mysql2 (>= 0.3.18, < 0.5) mysql2 (>= 0.3.18, < 0.5)

View File

@ -72,6 +72,7 @@ end
# ESLint # ESLint
guard :shell, all_on_start: true do guard :shell, all_on_start: true do
# TODO: Annoyingly, all files are linted twice on start/full runs. Why?
watch %r{app/assets/javascripts/*/.*} do |file| watch %r{app/assets/javascripts/*/.*} do |file|
system %(echo "ESLint:\033[32m #{file[0]}\033[0m") system %(echo "ESLint:\033[32m #{file[0]}\033[0m")
system %(eslint #{file[0]}) system %(eslint #{file[0]})
@ -86,8 +87,11 @@ guard :rubocop, cli: %w(-D -S) do
end end
guard 'brakeman', run_on_start: true, quiet: true do guard 'brakeman', run_on_start: true, quiet: true do
watch(%r{^app/.+\.(erb|haml|rhtml|rb)$}) ## Lets not watch files for brakeman,
watch(%r{^config/.+\.rb$}) ## just scan on guard start, and full runs.
watch(%r{^lib/.+\.rb$}) #
watch('Gemfile') # watch(%r{^app/.+\.(erb|haml|rhtml|rb)$})
# watch(%r{^config/.+\.rb$})
# watch(%r{^lib/.+\.rb$})
# watch('Gemfile')
end end

View File

@ -12,7 +12,6 @@ end
require File.expand_path('../../config/environment', __FILE__) require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help' require 'rails/test_help'
require "minitest/autorun"
require 'minitest/reporters' require 'minitest/reporters'
require 'policy_assertions' require 'policy_assertions'
Dir[Rails.root.join("test/test_helpers/**/*.rb")].each { |f| require f } Dir[Rails.root.join("test/test_helpers/**/*.rb")].each { |f| require f }