Class: Uspec::Stats
- Inherits:
-
Object
- Object
- Uspec::Stats
- Defined in:
- lib/uspec/stats.rb
Instance Attribute Summary collapse
-
#failure ⇒ Object
readonly
Returns the value of attribute failure.
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
- #clear_results! ⇒ Object
-
#initialize ⇒ Stats
constructor
A new instance of Stats.
- #inspect ⇒ Object
- #results ⇒ Object
- #summary ⇒ Object
Constructor Details
#initialize ⇒ Stats
Returns a new instance of Stats.
3 4 5 |
# File 'lib/uspec/stats.rb', line 3 def initialize clear_results! end |
Instance Attribute Details
#failure ⇒ Object (readonly)
Returns the value of attribute failure.
6 7 8 |
# File 'lib/uspec/stats.rb', line 6 def failure @failure end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
6 7 8 |
# File 'lib/uspec/stats.rb', line 6 def pending @pending end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
6 7 8 |
# File 'lib/uspec/stats.rb', line 6 def success @success end |
Instance Method Details
#clear_results! ⇒ Object
8 9 10 11 12 |
# File 'lib/uspec/stats.rb', line 8 def clear_results! @success = Array.new @failure = Array.new @pending = Array.new end |
#inspect ⇒ Object
14 15 16 17 18 19 |
# File 'lib/uspec/stats.rb', line 14 def inspect <<-INFO #{super} Failures: #{exit_code} #{results.map{|r| r.inspect}.join "\n\t" } INFO end |
#results ⇒ Object
21 22 23 |
# File 'lib/uspec/stats.rb', line 21 def results @success + @failure + @pending end |