Include guardfile from morpher, compatible with latest guard-rspec
This commit is contained in:
parent
b01294e578
commit
4c26dc740b
3 changed files with 11 additions and 26 deletions
32
Guardfile
32
Guardfile
|
@ -2,33 +2,15 @@
|
|||
|
||||
guard :bundler do
|
||||
watch('Gemfile')
|
||||
watch('Gemfile.lock')
|
||||
watch(%w{.+.gemspec\z})
|
||||
end
|
||||
|
||||
guard :rspec, cli: File.read('.rspec').split.push('--fail-fast').join(' '), keep_failed: false do
|
||||
# Run all specs if configuration is modified
|
||||
watch('.rspec') { 'spec' }
|
||||
watch('Guardfile') { 'spec' }
|
||||
watch('Gemfile.lock') { 'spec' }
|
||||
watch('spec/spec_helper.rb') { 'spec' }
|
||||
guard :rspec, :all_after_pass => false, :all_on_start => false, :cmd => 'bundle exec rspec --fail-fast --seed 0' do
|
||||
# run all specs if the spec_helper or supporting files files are modified
|
||||
watch('spec/spec_helper.rb') { 'spec/unit' }
|
||||
watch(%r{\Aspec/(?:lib|support|shared)/.+\.rb\z}) { 'spec/unit' }
|
||||
|
||||
# Run all specs if supporting files files are modified
|
||||
watch(%r{\Aspec/(?:fixtures|lib|support|shared)/.+\.rb\z}) { 'spec' }
|
||||
watch(%r{lib/.*.rb}) { 'spec/unit' }
|
||||
|
||||
# Run unit specs if associated lib code is modified
|
||||
watch(%r{\Alib/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}*"] }
|
||||
watch(%r{\Alib/(.+)/support/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}/#{m[2]}*"] }
|
||||
watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec' }
|
||||
|
||||
# Run a spec if it is modified
|
||||
watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
|
||||
# run a spec if it is modified
|
||||
watch(%r{\Aspec/.+_spec\.rb\z})
|
||||
end
|
||||
|
||||
# Deactivated for now. Somehow it disables the rspec guard.
|
||||
#
|
||||
# guard :rubocop, cli: %w[--config config/rubocop.yml] do
|
||||
# watch(%r{.+\.(?:rb|rake)\z})
|
||||
# watch(%r{\Aconfig/rubocop\.yml\z}) { |m| File.dirname(m[0]) }
|
||||
# watch(%r{(?:.+/)?\.rubocop\.yml\z}) { |m| File.dirname(m[0]) }
|
||||
# end
|
||||
|
|
|
@ -32,6 +32,7 @@ require 'mutant/node_helpers'
|
|||
require 'mutant/singleton_methods'
|
||||
require 'mutant/constants'
|
||||
require 'mutant/random'
|
||||
require 'mutant/walker'
|
||||
require 'mutant/predicate'
|
||||
require 'mutant/predicate/attribute'
|
||||
require 'mutant/predicate/whitelist'
|
||||
|
|
|
@ -43,6 +43,7 @@ module Mutant
|
|||
def initialize(arguments = [])
|
||||
@filters, @matchers = [], []
|
||||
@debug = @fail_fast = @zombie = false
|
||||
@expect_coverage = 100.0
|
||||
@strategy = Strategy::Null.new
|
||||
@cache = Mutant::Cache.new
|
||||
parse(arguments)
|
||||
|
@ -64,7 +65,8 @@ module Mutant
|
|||
subject_predicate: @subject_predicate.output,
|
||||
strategy: @strategy,
|
||||
fail_fast: @fail_fast,
|
||||
reporter: reporter
|
||||
reporter: reporter,
|
||||
expect_coverage: @expect_coverage
|
||||
)
|
||||
end
|
||||
memoize :config
|
||||
|
|
Loading…
Add table
Reference in a new issue