Class: RSpactorFormatter
- Inherits:
-
Object
- Object
- RSpactorFormatter
- Defined in:
- lib/resulting.rb
Instance Attribute Summary collapse
-
#example_group ⇒ Object
Returns the value of attribute example_group.
-
#options ⇒ Object
Returns the value of attribute options.
-
#where ⇒ Object
Returns the value of attribute where.
Instance Method Summary collapse
- #add_example_group(*ignore_these) ⇒ Object
- #close ⇒ Object
- #dump_failure(*ignore_these) ⇒ Object
- #dump_pending ⇒ Object
- #dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object
- #example_failed(*ignore_these) ⇒ Object
- #example_passed(*ignore_these) ⇒ Object
- #example_pending(*ignore_these) ⇒ Object
- #example_started(*ignore_these) ⇒ Object
- #growl(title, msg, img, pri = 0) ⇒ Object
-
#initialize(options, where) ⇒ RSpactorFormatter
constructor
A new instance of RSpactorFormatter.
- #start(*ignore_these) ⇒ Object
- #start_dump ⇒ Object
Constructor Details
#initialize(options, where) ⇒ RSpactorFormatter
Returns a new instance of RSpactorFormatter.
3 4 5 6 |
# File 'lib/resulting.rb', line 3 def initialize(, where) @options = @where = where end |
Instance Attribute Details
#example_group ⇒ Object
Returns the value of attribute example_group.
2 3 4 |
# File 'lib/resulting.rb', line 2 def example_group @example_group end |
#options ⇒ Object
Returns the value of attribute options.
2 3 4 |
# File 'lib/resulting.rb', line 2 def @options end |
#where ⇒ Object
Returns the value of attribute where.
2 3 4 |
# File 'lib/resulting.rb', line 2 def where @where end |
Instance Method Details
#add_example_group(*ignore_these) ⇒ Object
16 17 |
# File 'lib/resulting.rb', line 16 def add_example_group(*ignore_these) end |
#close ⇒ Object
40 41 |
# File 'lib/resulting.rb', line 40 def close end |
#dump_failure(*ignore_these) ⇒ Object
34 35 |
# File 'lib/resulting.rb', line 34 def dump_failure(*ignore_these) end |
#dump_pending ⇒ Object
37 38 |
# File 'lib/resulting.rb', line 37 def dump_pending end |
#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object
8 9 10 11 |
# File 'lib/resulting.rb', line 8 def dump_summary(duration, example_count, failure_count, pending_count) img = (failure_count == 0) ? "rails_ok.png" : "rails_fail.png" growl "Test Results", "#{example_count} examples, #{failure_count} failures", File.dirname(__FILE__) + "/../asset/#{img}", 0 end |
#example_failed(*ignore_these) ⇒ Object
25 26 |
# File 'lib/resulting.rb', line 25 def example_failed(*ignore_these) end |
#example_passed(*ignore_these) ⇒ Object
22 23 |
# File 'lib/resulting.rb', line 22 def example_passed(*ignore_these) end |
#example_pending(*ignore_these) ⇒ Object
28 29 |
# File 'lib/resulting.rb', line 28 def example_pending( *ignore_these) end |
#example_started(*ignore_these) ⇒ Object
19 20 |
# File 'lib/resulting.rb', line 19 def example_started(*ignore_these) end |
#growl(title, msg, img, pri = 0) ⇒ Object
43 44 45 |
# File 'lib/resulting.rb', line 43 def growl(title, msg, img, pri = 0) system("growlnotify -w -n rspactor --image #{img} -p #{pri} -m #{msg.inspect} #{title} &") end |
#start(*ignore_these) ⇒ Object
13 14 |
# File 'lib/resulting.rb', line 13 def start(*ignore_these) end |
#start_dump ⇒ Object
31 32 |
# File 'lib/resulting.rb', line 31 def start_dump end |