minitest-rails 2.0.3 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60a4c54263833134bc0d3af5380166f6ed21b396
4
- data.tar.gz: ae5f176d7b529f2d62abfb67674502e330e0f1e3
3
+ metadata.gz: 1c324bab2cf306972e4b226bc31db9b4f053f1bf
4
+ data.tar.gz: ef52eb65b39d3cd23e9eaf96dbe672b5a7710291
5
5
  SHA512:
6
- metadata.gz: 937426e1f1d82d3f3665bc5a8f6bac79d32d8ca4527a60b08953f24c47f30c56ba2505740edd327bf94819dc56a271e2db5b5bfd36455d2f9480259c60f9693e
7
- data.tar.gz: 767cf06ec9bfc0f19e766e7519145be15080a9bd6a09d8a377c4d81eeb7e620585d068059cf7e60e9003073dbeec1aad1af9a3f7814f12980b7049276e20bb92
6
+ metadata.gz: 0f73788eeb9edf7bb8a6ba0bf786b827148349dee0085c618cc8715ed337363f2402c03e4d8bf5b89117a66a7e9e93812d079ae1f93917c9a636c09116d5751d
7
+ data.tar.gz: 5fe9b55ac56a6c7334c505be134c7192e36309b8e1ac695f689ad3a628d685b5714417521d56db38673a0d99782aaf0c6a35e3a58ea0eb4df7e4d82bdf71fd75
@@ -1,3 +1,9 @@
1
+ === 2.1.0 / 2014-07-08
2
+
3
+ * Allow use of additional_spec in Minitest's Spec DSL.
4
+
5
+ https://github.com/blowmage/minitest-rails/compare/v2.0.3...v2.1.0
6
+
1
7
  === 2.0.3 / 2014-06-11
2
8
 
3
9
  * Fix bug in loading rake tasks (rmm5t)
data/Rakefile CHANGED
@@ -19,9 +19,9 @@ Hoe.spec "minitest-rails" do
19
19
 
20
20
  license "MIT"
21
21
 
22
- dependency "minitest", [ ">= 5.3.3", "< 6.0" ]
23
- dependency "railties", "~> 4.1"
24
- dependency "fakefs", "= 0.4.3", :dev
22
+ dependency "minitest", "~> 5.4"
23
+ dependency "railties", "~> 4.1"
24
+ dependency "fakefs", "= 0.4.3", :dev
25
25
  end
26
26
 
27
27
  Dir["tasks/**/*.rake"].each { |t| load t }
@@ -32,8 +32,8 @@ class ActiveSupport::TestCase
32
32
  desc < ActiveRecord::Base if desc.is_a?(Class)
33
33
  end
34
34
  end
35
- register_spec_type(self) do |desc, addl|
36
- :model == addl
35
+ register_spec_type(self) do |desc, *addl|
36
+ addl.include? :model
37
37
  end
38
38
  end
39
39
 
@@ -44,8 +44,8 @@ class ActionController::TestCase
44
44
  Class === desc && desc < ActionController::Metal
45
45
  end
46
46
  register_spec_type(/Controller( ?Test)?\z/i, self)
47
- register_spec_type(self) do |desc, addl|
48
- :controller == addl
47
+ register_spec_type(self) do |desc, *addl|
48
+ addl.include? :controller
49
49
  end
50
50
 
51
51
  # Resolve the controller from the test name when using the spec DSL
@@ -62,8 +62,9 @@ require "action_view/test_case"
62
62
  class ActionView::TestCase
63
63
  # Use AV::TestCase for the base class for helpers and views
64
64
  register_spec_type(/(Helper( ?Test)?| View Test)\z/i, self)
65
- register_spec_type(self) do |desc, addl|
66
- [ :view, :helper ].include? addl
65
+ register_spec_type(self) do |desc, *addl|
66
+ addl.include?(:view) ||
67
+ addl.include?(:helper)
67
68
  end
68
69
 
69
70
  # Resolve the helper or view from the test name when using the spec DSL
@@ -83,8 +84,8 @@ if defined? ActionMailer
83
84
  desc < ActionMailer::Base if desc.is_a?(Class)
84
85
  end
85
86
  register_spec_type(/Mailer( ?Test)?\z/i, self)
86
- register_spec_type(self) do |desc, addl|
87
- :mailer == addl
87
+ register_spec_type(self) do |desc, *addl|
88
+ addl.include? :mailer
88
89
  end
89
90
 
90
91
  # Resolve the mailer from the test name when using the spec DSL
@@ -102,8 +103,8 @@ require "action_dispatch/testing/integration"
102
103
  class ActionDispatch::IntegrationTest
103
104
  # Register by name, consider Acceptance to be deprecated
104
105
  register_spec_type(/(Integration|Acceptance)( ?Test)?\z/i, self)
105
- register_spec_type(self) do |desc, addl|
106
- :integration == addl
106
+ register_spec_type(self) do |desc, *addl|
107
+ addl.include? :integration
107
108
  end
108
109
  end
109
110
 
@@ -112,8 +113,8 @@ class Rails::Generators::TestCase
112
113
  desc < Rails::Generators::Base if desc.is_a?(Class)
113
114
  end
114
115
  register_spec_type(/Generator( ?Test)?\z/i, self)
115
- register_spec_type(self) do |desc, addl|
116
- :generator == addl
116
+ register_spec_type(self) do |desc, *addl|
117
+ addl.include? :generator
117
118
  end
118
119
 
119
120
  def self.determine_default_generator(name)
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Rails
3
- VERSION = "2.0.3"
3
+ VERSION = "2.1.0"
4
4
  end
5
5
  end
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: minitest-rails 2.0.3.20140611120000 ruby lib
2
+ # stub: minitest-rails 2.1.0.20140708182826 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "minitest-rails"
6
- s.version = "2.0.3.20140611120000"
6
+ s.version = "2.1.0.20140708182826"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Mike Moore"]
11
- s.date = "2014-06-11"
11
+ s.date = "2014-07-09"
12
12
  s.description = "Adds Minitest as the default testing library in Rails"
13
13
  s.email = ["mike@blowmage.com"]
14
14
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc"]
@@ -24,20 +24,20 @@ Gem::Specification.new do |s|
24
24
  s.specification_version = 4
25
25
 
26
26
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- s.add_runtime_dependency(%q<minitest>, ["< 6.0", ">= 5.3.3"])
27
+ s.add_runtime_dependency(%q<minitest>, ["~> 5.4"])
28
28
  s.add_runtime_dependency(%q<railties>, ["~> 4.1"])
29
29
  s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
30
30
  s.add_development_dependency(%q<fakefs>, ["= 0.4.3"])
31
31
  s.add_development_dependency(%q<hoe>, ["~> 3.12"])
32
32
  else
33
- s.add_dependency(%q<minitest>, ["< 6.0", ">= 5.3.3"])
33
+ s.add_dependency(%q<minitest>, ["~> 5.4"])
34
34
  s.add_dependency(%q<railties>, ["~> 4.1"])
35
35
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
36
36
  s.add_dependency(%q<fakefs>, ["= 0.4.3"])
37
37
  s.add_dependency(%q<hoe>, ["~> 3.12"])
38
38
  end
39
39
  else
40
- s.add_dependency(%q<minitest>, ["< 6.0", ">= 5.3.3"])
40
+ s.add_dependency(%q<minitest>, ["~> 5.4"])
41
41
  s.add_dependency(%q<railties>, ["~> 4.1"])
42
42
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
43
43
  s.add_dependency(%q<fakefs>, ["= 0.4.3"])
@@ -35,8 +35,13 @@ class TestApplicationControllerSpecType < Minitest::Test
35
35
  refute_controller Minitest::Spec.spec_type("Widget ControllerXTest")
36
36
  end
37
37
 
38
- def test_spec_type_resolves_for_additional_desc_controller
38
+ def test_spec_type_doesnt_resolve_random_strings
39
39
  refute_controller Minitest::Spec.spec_type("Unmatched String")
40
- assert_controller Minitest::Spec.spec_type(["Unmatched String", :controller])
40
+ end
41
+
42
+ def test_spec_type_resolves_for_additional_desc_controller
43
+ assert_controller Minitest::Spec.spec_type("Unmatched String", :controller)
44
+ assert_controller Minitest::Spec.spec_type("Unmatched String", :controller, :other)
45
+ assert_controller Minitest::Spec.spec_type("Unmatched String", :other, :controller)
41
46
  end
42
47
  end
@@ -49,8 +49,13 @@ class TestActionDispatchSpecType < Minitest::Test
49
49
  refute_dispatch Minitest::Spec.spec_type("Widget IntegrationXTest")
50
50
  end
51
51
 
52
- def test_spec_type_resolves_for_additional_desc_integration
52
+ def test_spec_type_doesnt_resolve_random_strings
53
53
  refute_dispatch Minitest::Spec.spec_type("Unmatched String")
54
- assert_dispatch Minitest::Spec.spec_type(["Unmatched String", :integration])
54
+ end
55
+
56
+ def test_spec_type_resolves_for_additional_desc_integration
57
+ assert_dispatch Minitest::Spec.spec_type("Unmatched String", :integration)
58
+ assert_dispatch Minitest::Spec.spec_type("Unmatched String", :integration, :other)
59
+ assert_dispatch Minitest::Spec.spec_type("Unmatched String", :other, :integration)
55
60
  end
56
61
  end
@@ -35,8 +35,13 @@ class TestActionMailerSpecType < Minitest::Test
35
35
  refute_mailer Minitest::Spec.spec_type("Widget MailerXTest")
36
36
  end
37
37
 
38
- def test_spec_type_resolves_for_additional_desc_mailer
38
+ def test_spec_type_doesnt_resolve_random_strings
39
39
  refute_mailer Minitest::Spec.spec_type("Unmatched String")
40
- assert_mailer Minitest::Spec.spec_type(["Unmatched String", :mailer])
40
+ end
41
+
42
+ def test_spec_type_resolves_for_additional_desc_mailer
43
+ assert_mailer Minitest::Spec.spec_type("Unmatched String", :mailer)
44
+ assert_mailer Minitest::Spec.spec_type("Unmatched String", :mailer, :other)
45
+ assert_mailer Minitest::Spec.spec_type("Unmatched String", :other, :mailer)
41
46
  end
42
47
  end
@@ -40,9 +40,19 @@ class TestActionViewSpecType < Minitest::Test
40
40
  refute_view Minitest::Spec.spec_type("Widget HelperXTest")
41
41
  end
42
42
 
43
- def test_spec_type_resolves_for_additional_desc_view_or_helper
43
+ def test_spec_type_doesnt_resolve_random_strings
44
44
  refute_view Minitest::Spec.spec_type("Unmatched String")
45
- assert_view Minitest::Spec.spec_type(["Unmatched String", :view])
46
- assert_view Minitest::Spec.spec_type(["Unmatched String", :helper])
45
+ end
46
+
47
+ def test_spec_type_resolves_for_additional_desc_view
48
+ assert_view Minitest::Spec.spec_type("Unmatched String", :view)
49
+ assert_view Minitest::Spec.spec_type("Unmatched String", :view, :other)
50
+ assert_view Minitest::Spec.spec_type("Unmatched String", :other, :view)
51
+ end
52
+
53
+ def test_spec_type_resolves_for_additional_desc_helper
54
+ assert_view Minitest::Spec.spec_type("Unmatched String", :helper)
55
+ assert_view Minitest::Spec.spec_type("Unmatched String", :helper, :other)
56
+ assert_view Minitest::Spec.spec_type("Unmatched String", :other, :helper)
47
57
  end
48
58
  end
@@ -21,6 +21,8 @@ class TestActiveSupportSpecType < Minitest::Test
21
21
  end
22
22
 
23
23
  def test_spec_type_resolves_for_additional_desc_model
24
- assert_support Minitest::Spec.spec_type(["Unmatched String", :model])
24
+ assert_support Minitest::Spec.spec_type("Unmatched String", :model)
25
+ assert_support Minitest::Spec.spec_type("Unmatched String", :model, :other)
26
+ assert_support Minitest::Spec.spec_type("Unmatched String", :other, :model)
25
27
  end
26
28
  end
@@ -32,4 +32,14 @@ class TestGeneratorsSpecType < Minitest::Test
32
32
  refute_generator Minitest::Spec.spec_type("Install Generator\fTest")
33
33
  refute_generator Minitest::Spec.spec_type("Install GeneratorXTest")
34
34
  end
35
+
36
+ def test_spec_type_doesnt_resolve_random_strings
37
+ refute_generator Minitest::Spec.spec_type("Unmatched String")
38
+ end
39
+
40
+ def test_spec_type_resolves_for_additional_desc_generator
41
+ assert_generator Minitest::Spec.spec_type("Unmatched String", :generator)
42
+ assert_generator Minitest::Spec.spec_type("Unmatched String", :generator, :other)
43
+ assert_generator Minitest::Spec.spec_type("Unmatched String", :other, :generator)
44
+ end
35
45
  end
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-11 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 5.3.3
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '6.0'
19
+ version: '5.4'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 5.3.3
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '6.0'
26
+ version: '5.4'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: railties
35
29
  requirement: !ruby/object:Gem::Requirement