mynyml-redgreen 0.6.2.1 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  pkg/*
2
+ *.gem
data/Manifest CHANGED
@@ -4,7 +4,6 @@ Manifest
4
4
  README
5
5
  Rakefile
6
6
  lib/redgreen.rb
7
- lib/redgreen/expectations.rb
8
7
  lib/redgreen/minitest.rb
9
8
  lib/redgreen/nanotest.rb
10
9
  lib/redgreen/testunit.rb
@@ -15,8 +14,6 @@ test/contest/test_failure.rb
15
14
  test/contest/test_success.rb
16
15
  test/context/test_failure.rb
17
16
  test/context/test_success.rb
18
- test/expectations/test_failure.rb
19
- test/expectations/test_success.rb
20
17
  test/minitest/test_failure.rb
21
18
  test/minitest/test_success.rb
22
19
  test/nanotest/test_failure.rb
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Standalone redgreen eye candy for test results, ala autotest
4
4
 
5
- Adds a visual cue at the end of a test run to better visualize whether test(s)
5
+ Adds a visual cue at the end of a test run to better visualize whether tests
6
6
  passed or failed.
7
7
 
8
8
  Red if a test failed, Green if all tests passed. Simple.
@@ -28,6 +28,5 @@ and run your suite.
28
28
  * probably all others
29
29
  * minitest/unit
30
30
  * nanotest
31
- * expectations
32
31
 
33
32
  Patches or requests for other framework adapters are very welcome
@@ -1,5 +1,3 @@
1
- require 'minitest/unit'
2
-
3
1
  class MiniTest::Unit::TestCase
4
2
  def new_run(runner)
5
3
  result = old_run(runner)
@@ -1,10 +1,9 @@
1
- require 'nanotest'
2
-
3
- at_exit do
4
- if NanoTest::FAILURES.empty?
5
- NanoTest::FAILURES << RedGreen.visual + "\n\n"
6
- else
7
- RedGreen.colour = :red
8
- NanoTest::FAILURES << RedGreen.visual + "\n\n"
1
+ module Nanotest
2
+ class << self
3
+ alias :redgreen__orig_results :results
4
+ def results
5
+ RedGreen.colour = :red unless @@failures.empty?
6
+ redgreen__orig_results.strip + "\n" + RedGreen.visual + "\n\n"
7
+ end
9
8
  end
10
9
  end
data/lib/redgreen.rb CHANGED
@@ -14,8 +14,7 @@ end
14
14
 
15
15
  dir = Pathname(__FILE__).dirname.parent.join('lib/redgreen')
16
16
 
17
- if defined?(Expectations::SuiteRunner) then require dir.join('expectations')
18
- elsif defined?(MiniTest::Unit::TestCase) then require dir.join('minitest')
17
+ if defined?(MiniTest::Unit::TestCase) then require dir.join('minitest')
19
18
  elsif defined?(Test::Unit::TestCase) then require dir.join('testunit')
20
- elsif defined?(NanoTest) then require dir.join('nanotest')
19
+ elsif defined?(Nanotest) then require dir.join('nanotest')
21
20
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'mynyml-redgreen'
3
- s.version = '0.6.2.1'
3
+ s.version = '0.7'
4
4
  s.summary = "Standalone redgreen eye candy for test results, ala autotest"
5
5
  s.description = "Standalone redgreen eye candy for test results, ala autotest."
6
6
  s.author = "Martin Aumont"
@@ -15,7 +15,6 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.add_development_dependency 'nanotest', '>= 0.9.2'
17
17
  s.add_development_dependency 'minitest', '>= 1.3.1'
18
- s.add_development_dependency 'expectations', '>= 1.2.1'
19
18
  s.add_development_dependency 'shoulda', '>= 2.10.1'
20
19
  s.add_development_dependency 'contest', '>= 0.1.1'
21
20
  s.add_development_dependency 'jeremymcanally-context', '>= 0.5.5'
@@ -1,5 +1,5 @@
1
1
  require 'nanotest'
2
2
  require 'lib/redgreen'
3
3
 
4
- include NanoTest
4
+ include Nanotest
5
5
  assert { false }
@@ -1,5 +1,5 @@
1
1
  require 'nanotest'
2
2
  require 'lib/redgreen'
3
3
 
4
- include NanoTest
4
+ include Nanotest
5
5
  assert { true }
data/test/tests.rake CHANGED
@@ -18,8 +18,6 @@ namespace(:test) do
18
18
  context/test_success.rb
19
19
  shoulda/test_failure.rb
20
20
  shoulda/test_success.rb
21
- expectations/test_failure.rb
22
- expectations/test_success.rb
23
21
  )
24
22
  files.map! {|file| Pathname(file).expand_path(test_root) }
25
23
  files.each {|file| system("ruby -rubygems -I.:lib #{file}") }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mynyml-redgreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2.1
4
+ version: "0.7"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Aumont
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-05 00:00:00 -05:00
12
+ date: 2009-11-27 00:00:00 -03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -42,16 +42,6 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: 1.3.1
44
44
  version:
45
- - !ruby/object:Gem::Dependency
46
- name: expectations
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 1.2.1
54
- version:
55
45
  - !ruby/object:Gem::Dependency
56
46
  name: shoulda
57
47
  type: :development
@@ -97,7 +87,6 @@ files:
97
87
  - README
98
88
  - Rakefile
99
89
  - lib/redgreen.rb
100
- - lib/redgreen/expectations.rb
101
90
  - lib/redgreen/minitest.rb
102
91
  - lib/redgreen/nanotest.rb
103
92
  - lib/redgreen/testunit.rb
@@ -108,8 +97,6 @@ files:
108
97
  - test/contest/test_success.rb
109
98
  - test/context/test_failure.rb
110
99
  - test/context/test_success.rb
111
- - test/expectations/test_failure.rb
112
- - test/expectations/test_success.rb
113
100
  - test/minitest/test_failure.rb
114
101
  - test/minitest/test_success.rb
115
102
  - test/nanotest/test_failure.rb
@@ -1,20 +0,0 @@
1
- require 'expectations/suite_results'
2
-
3
- class Expectations::SuiteResults
4
- def new_print_success
5
- old_print_success
6
- out.puts RedGreen.visual
7
- out.puts
8
- end
9
- alias :old_print_success :print_success
10
- alias :print_success :new_print_success
11
-
12
- def new_print_fail
13
- old_print_fail
14
- RedGreen.colour = :red
15
- out.puts RedGreen.visual
16
- out.puts
17
- end
18
- alias :old_print_fail :print_fail
19
- alias :print_fail :new_print_fail
20
- end
@@ -1,12 +0,0 @@
1
- unless RUBY_VERSION >= '1.9'
2
-
3
- require 'expectations'
4
- require 'lib/redgreen'
5
-
6
- Expectations do
7
- expect "THIS TEST SHOULD FAIL" do
8
- true
9
- end
10
- end
11
-
12
- end
@@ -1,12 +0,0 @@
1
- unless RUBY_VERSION >= '1.9'
2
-
3
- require 'expectations'
4
- require 'lib/redgreen'
5
-
6
- Expectations do
7
- expect "THIS TEST SHOULD PASS" do
8
- "THIS TEST SHOULD PASS"
9
- end
10
- end
11
-
12
- end