Class: Guard::PhantomJsJasmine

Inherits:
Plugin
  • Object
show all
Includes:
PhantomJsJasmineCli
Defined in:
lib/guard/phantomjs-jasmine.rb

Instance Method Summary collapse

Methods included from PhantomJsJasmineCli

#run

Constructor Details

#initialize(options = {}) ⇒ PhantomJsJasmine

Initialize Guard::PhantomJsJasmine

Parameters:

  • options (Hash) (defaults to: {})

    the options for the Guard

Options Hash (options):

  • :runner_script, (String)

    path to the runner script

  • :runner, (String)

    path to the jasmine runner



14
15
16
17
18
# File 'lib/guard/phantomjs-jasmine.rb', line 14

def initialize(options = {})
  super

  @options = options
end

Instance Method Details

#run_on_change(paths) ⇒ Object

Gets called when watched paths and files have changes.

Parameters:

  • paths (Array<String>)

    the changed paths and files



28
29
30
31
32
# File 'lib/guard/phantomjs-jasmine.rb', line 28

def run_on_change(paths)
  return if paths.empty?

  run(@options)
end

#startObject

Gets called once when Guard starts.



21
22
23
# File 'lib/guard/phantomjs-jasmine.rb', line 21

def start
  ::Guard::UI.info( "#{self.class} is running!" )
end