fix for new JHW where failure details are part of the report
This commit is contained in:
parent
245eeba260
commit
3fb7d8ac24
|
@ -17,7 +17,7 @@ module Guard
|
||||||
if (data = File.read(file).strip).empty?
|
if (data = File.read(file).strip).empty?
|
||||||
Notifier.notify('Spec runner interrupted!', :title => 'Jasmine results', :image => :failed)
|
Notifier.notify('Spec runner interrupted!', :title => 'Jasmine results', :image => :failed)
|
||||||
else
|
else
|
||||||
total, fails, any_console, secs = File.read(file).strip.split('/')
|
total, fails, any_console, secs = data.lines.first.strip.split('/')
|
||||||
|
|
||||||
Notifier.notify(message(total, fails, secs, any_console == "T"), :title => 'Jasmine results', :image => image(any_console == "T", fails))
|
Notifier.notify(message(total, fails, secs, any_console == "T"), :title => 'Jasmine results', :image => image(any_console == "T", fails))
|
||||||
fails.to_i
|
fails.to_i
|
||||||
|
|
|
@ -22,6 +22,16 @@ describe Guard::JasmineHeadlessWebkitRunner do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with failures' do
|
||||||
|
let(:data) { "1/0/F/5\nThis||Is||A||Failure\n" }
|
||||||
|
|
||||||
|
it 'should notify with the right information' do
|
||||||
|
Guard::Notifier.expects(:notify).with("1 test, 0 failures, 5 secs.", { :title => 'Jasmine results', :image => :success })
|
||||||
|
|
||||||
|
Guard::JasmineHeadlessWebkitRunner.notify(file)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'system run interrupted' do
|
context 'system run interrupted' do
|
||||||
let(:data) { '' }
|
let(:data) { '' }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue