Class: Guard::Gotest

Inherits:
Guard
  • Object
show all
Defined in:
lib/guard/gotest.rb,
lib/guard/gotest/runner.rb

Defined Under Namespace

Classes: Runner

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(watchers = [], options = {}) ⇒ Gotest

Returns a new instance of Gotest.



11
12
13
14
15
16
17
18
# File 'lib/guard/gotest.rb', line 11

def initialize(watchers = [], options = {})
  super
  @options = {
    :run_all => {}
  }.merge(options)

  @runner = Runner.new(@options)
end

Instance Attribute Details

#runnerObject

Returns the value of attribute runner.



9
10
11
# File 'lib/guard/gotest.rb', line 9

def runner
  @runner
end

Instance Method Details

#run_allObject



30
31
32
# File 'lib/guard/gotest.rb', line 30

def run_all
  # TODO
end

#run_on_changes(paths) ⇒ Object



34
35
36
# File 'lib/guard/gotest.rb', line 34

def run_on_changes(paths)
  @runner.run(paths)
end

#startObject



20
21
22
23
# File 'lib/guard/gotest.rb', line 20

def start
  UI.info "Guard::Gotest is running"
  run_all if @options[:all_on_start]
end

#stopObject



25
26
27
28
# File 'lib/guard/gotest.rb', line 25

def stop
  @runner.stop
  UI.info "Stopping Guard::Gotest"
end