Class: CommitLive::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/commit-live/tests/runner.rb

Instance Method Summary collapse

Constructor Details

#initializeTest

Returns a new instance of Test.



7
8
9
# File 'lib/commit-live/tests/runner.rb', line 7

def initialize()
  die if !strategy
end

Instance Method Details

#runObject



11
12
13
14
15
# File 'lib/commit-live/tests/runner.rb', line 11

def run
  strategy.check_dependencies
  strategy.configure
  strategy.run
end

#strategyObject



17
18
19
# File 'lib/commit-live/tests/runner.rb', line 17

def strategy
  @strategy ||= strategies.map{ |s| s.new() }.detect(&:detect)
end