Sha256: 59bd907fb84c0ccc9aa51fa490cd13c2e88de7d7d5b627ff04f7e59c1e599d56
Contents?: true
Size: 626 Bytes
Versions: 2
Compression:
Stored size: 626 Bytes
Contents
class NotifyOSDReporter < RSpec::Core::Formatters::ProgressFormatter def initialize(output) super(output) @failed_specs = 0 end def example_failed(example) super(example) @failed_specs += 1 `notify-send "Rspec: #{example.full_description}", "#{example.execution_result[:exception].message.gsub(/"/, "'")}"` end def close if @failed_specs == 0 `notify-send "Rspec: no failed specs", "No failed specs"` else `notify-send "Rspec: #{@failed_specs} failed specs", "#{@failed_specs} failed specs"` end end end RSpec.configure do |c| c.add_formatter NotifyOSDReporter end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rnotify-0.2 | lib/adapters/rspec.rb |
rnotify-0.1 | lib/adapters/rspec.rb |