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 +4 -4
- data/CHANGELOG.rdoc +6 -0
- data/Rakefile +3 -3
- data/lib/minitest/rails.rb +13 -12
- data/lib/minitest/rails/version.rb +1 -1
- data/minitest-rails.gemspec +6 -6
- data/test/rails/action_controller/test_spec_type.rb +7 -2
- data/test/rails/action_dispatch/test_spec_type.rb +7 -2
- data/test/rails/action_mailer/test_spec_type.rb +7 -2
- data/test/rails/action_view/test_spec_type.rb +13 -3
- data/test/rails/active_support/test_spec_type.rb +3 -1
- data/test/rails/generators/test_spec_type.rb +10 -0
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c324bab2cf306972e4b226bc31db9b4f053f1bf
|
4
|
+
data.tar.gz: ef52eb65b39d3cd23e9eaf96dbe672b5a7710291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f73788eeb9edf7bb8a6ba0bf786b827148349dee0085c618cc8715ed337363f2402c03e4d8bf5b89117a66a7e9e93812d079ae1f93917c9a636c09116d5751d
|
7
|
+
data.tar.gz: 5fe9b55ac56a6c7334c505be134c7192e36309b8e1ac695f689ad3a628d685b5714417521d56db38673a0d99782aaf0c6a35e3a58ea0eb4df7e4d82bdf71fd75
|
data/CHANGELOG.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -19,9 +19,9 @@ Hoe.spec "minitest-rails" do
|
|
19
19
|
|
20
20
|
license "MIT"
|
21
21
|
|
22
|
-
dependency "minitest",
|
23
|
-
dependency "railties",
|
24
|
-
dependency "fakefs",
|
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 }
|
data/lib/minitest/rails.rb
CHANGED
@@ -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
|
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
|
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
|
-
|
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
|
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
|
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
|
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)
|
data/minitest-rails.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: minitest-rails 2.0.
|
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.
|
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-
|
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>, ["
|
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>, ["
|
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>, ["
|
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
|
38
|
+
def test_spec_type_doesnt_resolve_random_strings
|
39
39
|
refute_controller Minitest::Spec.spec_type("Unmatched String")
|
40
|
-
|
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
|
52
|
+
def test_spec_type_doesnt_resolve_random_strings
|
53
53
|
refute_dispatch Minitest::Spec.spec_type("Unmatched String")
|
54
|
-
|
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
|
38
|
+
def test_spec_type_doesnt_resolve_random_strings
|
39
39
|
refute_mailer Minitest::Spec.spec_type("Unmatched String")
|
40
|
-
|
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
|
43
|
+
def test_spec_type_doesnt_resolve_random_strings
|
44
44
|
refute_view Minitest::Spec.spec_type("Unmatched String")
|
45
|
-
|
46
|
-
|
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(
|
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
|
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-
|
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: '
|
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: '
|
26
|
+
version: '5.4'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: railties
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|