Class: RSpactorFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/resulting.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, where) ⇒ RSpactorFormatter

Returns a new instance of RSpactorFormatter.



3
4
5
6
# File 'lib/resulting.rb', line 3

def initialize(options, where)
  @options = options
  @where = where
end

Instance Attribute Details

#example_groupObject

Returns the value of attribute example_group.



2
3
4
# File 'lib/resulting.rb', line 2

def example_group
  @example_group
end

#optionsObject

Returns the value of attribute options.



2
3
4
# File 'lib/resulting.rb', line 2

def options
  @options
end

#whereObject

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

#closeObject



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_pendingObject



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_dumpObject



31
32
# File 'lib/resulting.rb', line 31

def start_dump
end