Class: Teresa::Test
- Inherits:
-
Object
- Object
- Teresa::Test
- Defined in:
- lib/teresa/test.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#output ⇒ Object
Returns the value of attribute output.
-
#state ⇒ Object
Returns the value of attribute state.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(options = {}) ⇒ Test
constructor
A new instance of Test.
- #inspect ⇒ Object
- #passed? ⇒ Boolean
- #skipped? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Test
Returns a new instance of Test.
5 6 7 8 |
# File 'lib/teresa/test.rb', line 5 def initialize( = {}) @state = :passed .each { |k,v| send("#{k}=", v) if respond_to? "#{k}=" } end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/teresa/test.rb', line 3 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/teresa/test.rb', line 3 def @message end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/teresa/test.rb', line 3 def name @name end |
#output ⇒ Object
Returns the value of attribute output.
3 4 5 |
# File 'lib/teresa/test.rb', line 3 def output @output end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/teresa/test.rb', line 3 def state @state end |
#time ⇒ Object
Returns the value of attribute time.
3 4 5 |
# File 'lib/teresa/test.rb', line 3 def time @time end |
Instance Method Details
#failed? ⇒ Boolean
10 11 12 |
# File 'lib/teresa/test.rb', line 10 def failed? state == :failed end |
#inspect ⇒ Object
22 23 24 |
# File 'lib/teresa/test.rb', line 22 def inspect "#<%p:%p>" % [self.class, name] end |
#passed? ⇒ Boolean
14 15 16 |
# File 'lib/teresa/test.rb', line 14 def passed? state == :passed end |
#skipped? ⇒ Boolean
18 19 20 |
# File 'lib/teresa/test.rb', line 18 def skipped? state == :skipped end |