Class: Heidi::Tester
- Inherits:
-
Object
- Object
- Heidi::Tester
- Defined in:
- lib/heidi/tester.rb
Instance Attribute Summary collapse
-
#build ⇒ Object
readonly
Returns the value of attribute build.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(integrator) ⇒ Tester
constructor
A new instance of Tester.
- #test! ⇒ Object
Constructor Details
#initialize(integrator) ⇒ Tester
Returns a new instance of Tester.
5 6 7 8 9 10 |
# File 'lib/heidi/tester.rb', line 5 def initialize(integrator) @integrator = integrator @build = integrator.build @project = @build.project @message = "" end |
Instance Attribute Details
#build ⇒ Object (readonly)
Returns the value of attribute build.
3 4 5 |
# File 'lib/heidi/tester.rb', line 3 def build @build end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/heidi/tester.rb', line 3 def @message end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
3 4 5 |
# File 'lib/heidi/tester.rb', line 3 def project @project end |
Instance Method Details
#test! ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/heidi/tester.rb', line 12 def test! build.log(:info, "Starting tests") if build.hooks[:tests].empty? build.log(:error, "There are no test hooks") @message = "There are no test hooks" return false end return @integrator.run_hooks(:tests) end |