Class: Detroit::Turn

Inherits:
Tool
  • Object
show all
Defined in:
lib/detroit-turn.rb

Overview

The Turn tool your TestUnit or MiniTest unit tests using Turn.

NOTE: This tool currently shells out to the command line.

Constant Summary collapse

DEFAULT_TESTS =

Default test file patterns.

["test/**/test_*.rb", "test/**/*_test.rb" ]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exclude ⇒ Object

Test file patterns to specially exclude.



23
24
25
# File 'lib/detroit-turn.rb', line 23

def exclude
  @exclude
end

#live ⇒ Object

Test against live install (i.e. Don't use loadpath option).



32
33
34
# File 'lib/detroit-turn.rb', line 32

def live
  @live
end

#loadpath ⇒ Object

Add these folders to the $LOAD_PATH.



26
27
28
# File 'lib/detroit-turn.rb', line 26

def loadpath
  @loadpath
end

#log ⇒ Object

Either a log file name or +true+/+false+.



35
36
37
# File 'lib/detroit-turn.rb', line 35

def log
  @log
end

#requires ⇒ Object

Libs to require when running tests.



29
30
31
# File 'lib/detroit-turn.rb', line 29

def requires
  @requires
end

#tests ⇒ Object

File glob pattern of tests to run.



20
21
22
# File 'lib/detroit-turn.rb', line 20

def tests
  @tests
end

Class Method Details

.man_page ⇒ Object



192
193
194
# File 'lib/detroit-turn.rb', line 192

def self.man_page
  File.dirname(__FILE__)+'/../man/detroit-turn.5'
end

Instance Method Details

#assemble(station, options = {}) ⇒ Object



67
68
69
70
71
72
# File 'lib/detroit-turn.rb', line 67

def assemble(station, options={})
  case station
  when :test
    run
  end
end

#assemble?(station, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
62
63
64
# File 'lib/detroit-turn.rb', line 59

def assemble?(station, options={})
  case station
  when :test
    true
  end
end

#logfile ⇒ Object



78
79
80
81
82
83
84
85
# File 'lib/detroit-turn.rb', line 78

def logfile
  case log
  when String
    project.log + log
  else
    project.log + 'turn.log'
  end
end

#run ⇒ Object



88
89
90
# File 'lib/detroit-turn.rb', line 88

def run
  run_tests
end