test_notifier 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -25,4 +25,8 @@
25
25
 
26
26
  == 0.0.7 2008-01-16
27
27
 
28
+ * bug fix
29
+
30
+ == 0.0.8 2008-01-18
31
+
28
32
  * bug fix
@@ -1,7 +1,10 @@
1
1
  require 'test_notifier'
2
2
 
3
3
  Autotest.add_hook :ran_command do |at|
4
- content = at.results.to_s
4
+ begin
5
+ content = at.results.to_s
5
6
 
6
- TestNotifier.rspec?(content) ? TestNotifier.notification_for_rspec(content) : TestNotifier.notification_for_test_unit(content)
7
+ TestNotifier.rspec?(content) ? TestNotifier.notification_for_rspec(content) : TestNotifier.notification_for_test_unit(content)
8
+ rescue
9
+ end
7
10
  end
@@ -7,17 +7,20 @@ class Spec::Runner::Formatter::BaseTextFormatter
7
7
  def dump_summary(duration, examples, failed, pending)
8
8
  dump_summary_original(duration, examples, failed, pending)
9
9
 
10
- return if examples == 0
11
-
12
- if failed > 0
13
- title = TestNotifier::FAILURE_TITLE
14
- image = TestNotifier::ERROR_IMAGE
15
- else
16
- title = TestNotifier::PASSED_TITLE
17
- image = TestNotifier::PASSED_IMAGE
10
+ begin
11
+ return if examples == 0
12
+
13
+ if failed > 0
14
+ title = TestNotifier::FAILURE_TITLE
15
+ image = TestNotifier::ERROR_IMAGE
16
+ else
17
+ title = TestNotifier::PASSED_TITLE
18
+ image = TestNotifier::PASSED_IMAGE
19
+ end
20
+
21
+ message = "#{examples} examples, #{failed} failed, #{pending} pending"
22
+ TestNotifier::notify(image, title, message)
23
+ rescue
18
24
  end
19
-
20
- message = "#{examples} examples, #{failed} failed, #{pending} pending"
21
- TestNotifier.notify(image, title, message)
22
25
  end
23
26
  end
@@ -1,20 +1,16 @@
1
1
  require 'test_notifier'
2
2
  require 'test/unit/ui/console/testrunner'
3
3
 
4
- module Test
5
- module Unit
6
- module UI
7
- module Console
8
- class TestRunner
9
- alias finished_original finished
4
+ class Test::Unit::UI::Console::TestRunner
5
+ alias finished_original finished
10
6
 
11
- def finished(elapsed_time)
12
- finished_original(elapsed_time)
13
- content = @result.to_s
14
- TestNotifier.notification_for_test_unit(content)
15
- end
16
- end
17
- end
7
+ def finished(elapsed_time)
8
+ finished_original(elapsed_time)
9
+
10
+ begin
11
+ content = @result.to_s
12
+ TestNotifier.notification_for_test_unit(content)
13
+ rescue
18
14
  end
19
15
  end
20
16
  end
@@ -2,7 +2,7 @@ module TestNotifier #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 7
5
+ TINY = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-16 00:00:00 -02:00
12
+ date: 2008-01-18 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15