Method: Guard::Minitest::Runner#initialize

Defined in:
lib/guard/minitest/runner.rb

#initialize(options = {}) ⇒ Runner

Returns a new instance of Runner.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/guard/minitest/runner.rb', line 9

def initialize(options = {})
  @options = {
    all_after_pass:     false,
    bundler:            File.exist?("#{Dir.pwd}/Gemfile"),
    rubygems:           false,
    drb:                false,
    zeus:               false,
    spring:             false,
    all_env:            {},
    env:                {},
    include:            [],
    test_folders:       %w(test spec),
    test_file_patterns: %w(*_test.rb test_*.rb *_spec.rb),
    cli:                nil,
    autorun:            true
  }.merge(options)

  parse_deprecated_options

  [:test_folders, :test_file_patterns].each do |k|
    @options[k] = Array(@options[k]).uniq.compact
  end

  @inspector = Inspector.new(test_folders, test_file_patterns)
end