minitest-excludes 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fbc9d76be558452342382d8f5168cad3155c1f03
4
+ data.tar.gz: 23c74a800e7abe8cd532375e54533c62fd379fa6
5
+ SHA512:
6
+ metadata.gz: 1c7eb8b1ba180eb795898e69a37e0e11119847c2bc15d441151104424621676b5dd4d3bd2d7c41c7d76c36a28d140baedb08da3973ac7df7bafb271846a267fd
7
+ data.tar.gz: a3d89e7650562220008cce289ceca5c56fa375c6b7608867bccf8412a51ec1f4165cce92d77056819f3dbfc956ea7cadf09fa1a61b23efb37c27a96423dd0c6f
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 2.0.0 / 2015-02-02
2
+
3
+ * 1 major enhancement:
4
+
5
+ * Updated for minitest 5.
6
+
1
7
  === 1.0.2 / 2013-04-22
2
8
 
3
9
  * 1 bug fix:
data/Rakefile CHANGED
@@ -6,6 +6,8 @@ require "hoe"
6
6
  Hoe.plugin :isolate
7
7
  Hoe.plugin :seattlerb
8
8
 
9
+ Hoe.add_include_dirs "../../minitest/dev/lib"
10
+
9
11
  Hoe.spec "minitest-excludes" do
10
12
  developer "Ryan Davis", "ryand-ruby@zenspider.com"
11
13
 
@@ -1,7 +1,7 @@
1
1
  require 'minitest/unit'
2
2
 
3
- module MiniTest::Unit::Excludes # :nodoc:
4
- VERSION = "1.0.2" # :nodoc:
3
+ module Minitest::Excludes # :nodoc:
4
+ VERSION = "2.0.0" # :nodoc:
5
5
  end
6
6
 
7
7
  ##
@@ -36,7 +36,7 @@ end
36
36
  # If you want to change where the exclude files are located, you can
37
37
  # set the EXCLUDE_DIR environment variable.
38
38
 
39
- class MiniTest::Unit::TestCase
39
+ class Minitest::Test
40
40
  EXCLUDE_DIR = ENV['EXCLUDE_DIR'] || "test/excludes"
41
41
 
42
42
  ##
@@ -65,11 +65,11 @@ class MiniTest::Unit::TestCase
65
65
  end
66
66
 
67
67
  class << self
68
- alias :old_test_methods :test_methods # :nodoc:
68
+ alias :old_runnable_methods :runnable_methods # :nodoc:
69
69
 
70
- def test_methods # :nodoc:
70
+ def runnable_methods # :nodoc:
71
71
  load_excludes
72
- old_test_methods
72
+ old_runnable_methods
73
73
  end
74
74
  end
75
75
  end
data/test/metametameta.rb CHANGED
@@ -2,42 +2,84 @@ require 'tempfile'
2
2
  require 'stringio'
3
3
  require 'minitest/autorun'
4
4
 
5
- class MetaMetaMetaTestCase < MiniTest::Unit::TestCase
6
- def assert_report expected = nil
7
- expected ||= <<-EOM.gsub(/^ {6}/, '')
8
- Run options: --seed 42
5
+ class Minitest::Test
6
+ def clean s
7
+ s.gsub(/^ {6}/, '')
8
+ end
9
+ end
10
+
11
+ class MetaMetaMetaTestCase < Minitest::Test
12
+ attr_accessor :reporter, :output, :tu
13
+
14
+ def run_tu_with_fresh_reporter flags = %w[--seed 42]
15
+ options = Minitest.process_args flags
16
+
17
+ @output = StringIO.new("")
18
+
19
+ self.reporter = Minitest::CompositeReporter.new
20
+ reporter << Minitest::SummaryReporter.new(@output, options)
21
+ reporter << Minitest::ProgressReporter.new(@output, options)
22
+
23
+ reporter.start
24
+
25
+ yield(reporter) if block_given?
26
+
27
+ @tus ||= [@tu]
28
+ @tus.each do |tu|
29
+ Minitest::Runnable.runnables.delete tu
30
+
31
+ tu.run reporter, options
32
+ end
9
33
 
10
- # Running tests:
34
+ reporter.report
35
+ end
36
+
37
+ def first_reporter
38
+ reporter.reporters.first
39
+ end
11
40
 
12
- .
41
+ def assert_report expected, flags = %w[--seed 42], &block
42
+ header = clean <<-EOM
43
+ Run options: #{flags.map { |s| s =~ /\|/ ? s.inspect : s }.join " "}
13
44
 
14
- Finished tests in 0.00
45
+ # Running:
15
46
 
16
- 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
17
47
  EOM
18
48
 
19
- output = @output.string.dup
20
- output.sub!(/Finished tests in .*/, "Finished tests in 0.00")
49
+ run_tu_with_fresh_reporter flags, &block
50
+
51
+ output = normalize_output @output.string.dup
52
+
53
+ assert_equal header + expected, output
54
+ end
55
+
56
+ def normalize_output output
57
+ output.sub!(/Finished in .*/, "Finished in 0.00")
21
58
  output.sub!(/Loaded suite .*/, 'Loaded suite blah')
22
- output.gsub!(/[\w\/]+\/test\/[^:]+:\d+/, 'FILE:LINE')
23
- output.gsub!(/(?:.\/)?test\/[^:]+:\d+/, 'FILE:LINE')
24
- output.gsub!(/\[[^\]]+\]/, '[FILE:LINE]')
25
- assert_equal(expected, output)
59
+
60
+ output.gsub!(/ = \d+.\d\d s = /, ' = 0.00 s = ')
61
+ output.gsub!(/0x[A-Fa-f0-9]+/, '0xXXX')
62
+
63
+ if windows? then
64
+ output.gsub!(/\[(?:[A-Za-z]:)?[^\]:]+:\d+\]/, '[FILE:LINE]')
65
+ output.gsub!(/^(\s+)(?:[A-Za-z]:)?[^:]+:\d+:in/, '\1FILE:LINE:in')
66
+ else
67
+ output.gsub!(/\[[^\]:]+:\d+\]/, '[FILE:LINE]')
68
+ output.gsub!(/^(\s+)[^:]+:\d+:in/, '\1FILE:LINE:in')
69
+ end
70
+
71
+ output
26
72
  end
27
73
 
28
74
  def setup
29
75
  super
30
76
  srand 42
31
- MiniTest::Unit::TestCase.reset
32
- @tu = MiniTest::Unit.new
33
- @output = StringIO.new("")
34
- MiniTest::Unit.runner = nil # protect the outer runner from the inner tests
35
- MiniTest::Unit.output = @output
77
+ Minitest::Test.reset
78
+ @tu = nil
36
79
  end
37
80
 
38
81
  def teardown
39
82
  super
40
- MiniTest::Unit.output = $stdout
41
83
  Object.send :remove_const, :ATestCase if defined? ATestCase
42
84
  end
43
85
  end
@@ -1,15 +1,15 @@
1
1
  require 'test/metametameta'
2
2
  require 'minitest/excludes'
3
3
 
4
- class TestMiniTestExcludes < MetaMetaMetaTestCase
4
+ class TestMinitestExcludes < MetaMetaMetaTestCase
5
5
  def test_cls_excludes
6
6
  srand 42
7
- old_exclude_base = MiniTest::Unit::TestCase::EXCLUDE_DIR
7
+ old_exclude_base = Minitest::Test::EXCLUDE_DIR
8
8
 
9
9
  @assertion_count = 0
10
10
 
11
11
  Dir.mktmpdir do |path|
12
- MiniTest::Unit::TestCase::EXCLUDE_DIR.replace(path)
12
+ Minitest::Test::EXCLUDE_DIR.replace(path)
13
13
  Dir.mkdir File.join path, "ATestCase"
14
14
 
15
15
  s = 'exclude :test_test2, "because it is borked"'
@@ -24,12 +24,12 @@ class TestMiniTestExcludes < MetaMetaMetaTestCase
24
24
 
25
25
  tc1 = tc2 = nil
26
26
 
27
- tc1 = Class.new(MiniTest::Unit::TestCase) do
27
+ tc1 = Class.new(Minitest::Test) do
28
28
  def test_test1; assert true end
29
29
  def test_test2; assert false end # oh noes!
30
30
  def test_test3; assert true end
31
31
 
32
- tc2 = Class.new(MiniTest::Unit::TestCase) do
32
+ tc2 = Class.new(Minitest::Test) do
33
33
  def test_test1; assert true end
34
34
  def test_test2; assert false end # oh noes!
35
35
  def test_test3; assert true end
@@ -39,29 +39,24 @@ class TestMiniTestExcludes < MetaMetaMetaTestCase
39
39
  Object.const_set(:ATestCase, tc1)
40
40
  ATestCase.const_set(:Nested, tc2)
41
41
 
42
- assert_equal %w(test_test3 test_test1), ATestCase.test_methods
43
- assert_equal %w(test_test1 test_test3), ATestCase::Nested.test_methods
42
+ @tus = [tc1, tc2]
44
43
 
45
- @tu.run %w[--seed 42 --verbose]
44
+ assert_equal %w(test_test3 test_test1), ATestCase.runnable_methods
45
+ assert_equal %w(test_test1 test_test3), ATestCase::Nested.runnable_methods
46
46
 
47
47
  expected = <<-EOM.gsub(/^ {8}/, '')
48
- Run options: --seed 42 --verbose
49
-
50
- # Running tests:
51
-
52
48
  ATestCase#test_test1 = 0.00 s = .
53
49
  ATestCase#test_test3 = 0.00 s = .
54
50
  ATestCase::Nested#test_test1 = 0.00 s = .
55
51
  ATestCase::Nested#test_test3 = 0.00 s = .
56
52
 
53
+ Finished in 0.00
57
54
 
58
- Finished tests in 0.00
59
-
60
- 4 tests, 4 assertions, 0 failures, 0 errors, 0 skips
55
+ 4 runs, 4 assertions, 0 failures, 0 errors, 0 skips
61
56
  EOM
62
- assert_report expected
57
+ assert_report expected, %w[--seed 42 --verbose]
63
58
  end
64
59
  ensure
65
- MiniTest::Unit::TestCase::EXCLUDE_DIR.replace(old_exclude_base)
60
+ Minitest::Test::EXCLUDE_DIR.replace(old_exclude_base)
66
61
  end
67
62
  end
metadata CHANGED
@@ -1,24 +1,18 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: minitest-excludes
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 2
10
- version: 1.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Ryan Davis
14
8
  autorequire:
15
9
  bindir: bin
16
- cert_chain:
10
+ cert_chain:
17
11
  - |
18
12
  -----BEGIN CERTIFICATE-----
19
- MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
20
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
21
- GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
22
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
23
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADgg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ERTIFICATE-----
38
-
39
- date: 2013-04-23 00:00:00 Z
40
- dependencies:
41
- - !ruby/object:Gem::Dependency
32
+ date: 2015-02-02 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
42
35
  name: minitest
43
- prerelease: false
44
- requirement: &id001 !ruby/object:Gem::Requirement
45
- none: false
46
- requirements:
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
47
38
  - - ~>
48
- - !ruby/object:Gem::Version
49
- hash: 27
50
- segments:
51
- - 4
52
- - 0
53
- version: "4.0"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
54
41
  type: :runtime
55
- version_requirements: *id001
56
- - !ruby/object:Gem::Dependency
57
- name: rdoc
58
42
  prerelease: false
59
- requirement: &id002 !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rdoc
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
62
52
  - - ~>
63
- - !ruby/object:Gem::Version
64
- hash: 27
65
- segments:
66
- - 4
67
- - 0
68
- version: "4.0"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
69
55
  type: :development
70
- version_requirements: *id002
71
- - !ruby/object:Gem::Dependency
72
- name: hoe
73
56
  prerelease: false
74
- requirement: &id003 !ruby/object:Gem::Requirement
75
- none: false
76
- requirements:
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
77
59
  - - ~>
78
- - !ruby/object:Gem::Version
79
- hash: 11
80
- segments:
81
- - 3
82
- - 6
83
- version: "3.6"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: hoe
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '3.13'
84
69
  type: :development
85
- version_requirements: *id003
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '3.13'
86
76
  description: |-
87
77
  minitest/excludes.rb extends MiniTest::Unit::TestCase to provide a
88
78
  clean API for excluding certain tests you don't want to run under
89
79
  certain conditions.
90
- email:
80
+ email:
91
81
  - ryand-ruby@zenspider.com
92
82
  executables: []
93
-
94
83
  extensions: []
95
-
96
- extra_rdoc_files:
84
+ extra_rdoc_files:
97
85
  - History.txt
98
86
  - Manifest.txt
99
87
  - README.txt
100
- files:
88
+ files:
101
89
  - .autotest
90
+ - .gemtest
102
91
  - History.txt
103
92
  - Manifest.txt
104
93
  - README.txt
@@ -106,40 +95,32 @@ files:
106
95
  - lib/minitest/excludes.rb
107
96
  - test/metametameta.rb
108
97
  - test/test_minitest_excludes.rb
109
- - .gemtest
110
98
  homepage: https://github.com/seattlerb/minitest-excludes
111
- licenses: []
112
-
99
+ licenses:
100
+ - MIT
101
+ metadata: {}
113
102
  post_install_message:
114
- rdoc_options:
103
+ rdoc_options:
115
104
  - --main
116
105
  - README.txt
117
- require_paths:
106
+ require_paths:
118
107
  - lib
119
- required_ruby_version: !ruby/object:Gem::Requirement
120
- none: false
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
126
- - 0
127
- version: "0"
128
- required_rubygems_version: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
135
- - 0
136
- version: "0"
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
137
118
  requirements: []
138
-
139
- rubyforge_project: minitest-excludes
140
- rubygems_version: 1.8.25
119
+ rubyforge_project:
120
+ rubygems_version: 2.4.5
141
121
  signing_key:
142
- specification_version: 3
143
- summary: minitest/excludes.rb extends MiniTest::Unit::TestCase to provide a clean API for excluding certain tests you don't want to run under certain conditions.
144
- test_files:
122
+ specification_version: 4
123
+ summary: minitest/excludes.rb extends MiniTest::Unit::TestCase to provide a clean
124
+ API for excluding certain tests you don't want to run under certain conditions.
125
+ test_files:
145
126
  - test/test_minitest_excludes.rb
metadata.gz.sig CHANGED
Binary file