minitest-spec-rails 5.4.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +26 -0
- data/.travis.yml +8 -5
- data/Appraisals +9 -2
- data/CHANGELOG.md +5 -1
- data/Gemfile +0 -1
- data/README.md +17 -28
- data/Rakefile +4 -5
- data/gemfiles/rails41.gemfile.lock +44 -45
- data/gemfiles/rails42.gemfile.lock +64 -67
- data/gemfiles/rails50.gemfile +2 -1
- data/gemfiles/rails50.gemfile.lock +75 -80
- data/gemfiles/rails51.gemfile +8 -0
- data/gemfiles/rails51.gemfile.lock +128 -0
- data/lib/minitest-spec-rails/dsl.rb +5 -9
- data/lib/minitest-spec-rails/init/action_controller.rb +3 -7
- data/lib/minitest-spec-rails/init/action_dispatch.rb +1 -3
- data/lib/minitest-spec-rails/init/action_mailer.rb +2 -7
- data/lib/minitest-spec-rails/init/action_view.rb +1 -5
- data/lib/minitest-spec-rails/init/active_job.rb +3 -8
- data/lib/minitest-spec-rails/init/active_support.rb +8 -10
- data/lib/minitest-spec-rails/init/mini_shoulda.rb +2 -6
- data/lib/minitest-spec-rails/railtie.rb +21 -21
- data/lib/minitest-spec-rails/version.rb +1 -1
- data/minitest-spec-rails.gemspec +5 -5
- data/test/cases/action_controller_test.rb +7 -10
- data/test/cases/action_dispatch_test.rb +10 -13
- data/test/cases/action_mailer_test.rb +7 -10
- data/test/cases/action_view_test.rb +13 -16
- data/test/cases/active_job_test.rb +38 -36
- data/test/cases/active_support_test.rb +22 -12
- data/test/cases/mini_shoulda_test.rb +0 -4
- data/test/dummy_app/app/controllers/application_controller.rb +1 -3
- data/test/dummy_app/app/controllers/users_controller.rb +1 -3
- data/test/dummy_app/app/helpers/application_helper.rb +0 -1
- data/test/dummy_app/app/helpers/foos_helper.rb +3 -1
- data/test/dummy_app/app/helpers/users_helper.rb +1 -3
- data/test/dummy_app/app/mailers/user_mailer.rb +2 -4
- data/test/dummy_app/app/models/post.rb +0 -3
- data/test/dummy_app/app/models/user.rb +0 -3
- data/test/dummy_app/config/routes.rb +1 -1
- data/test/dummy_app/init.rb +2 -4
- data/test/dummy_tests/application_controller_test.rb +3 -9
- data/test/dummy_tests/foos_helper_test.rb +0 -3
- data/test/dummy_tests/integration_test.rb +2 -8
- data/test/dummy_tests/special_users_controller_test.rb +0 -2
- data/test/dummy_tests/user_mailer_test.rb +4 -10
- data/test/dummy_tests/user_test.rb +2 -8
- data/test/dummy_tests/users_controller_test.rb +1 -3
- data/test/dummy_tests/users_helper_test.rb +2 -8
- data/test/support/shared_test_case_behavior.rb +4 -7
- data/test/test_helper.rb +0 -3
- data/test/test_helper_dummy.rb +5 -6
- metadata +8 -4
@@ -3,7 +3,6 @@ require 'test_helper_dummy'
|
|
3
3
|
module UsersHelperTests
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
included do
|
6
|
-
|
7
6
|
let(:users_list) { render_users_list User.all }
|
8
7
|
|
9
8
|
before { user_ken }
|
@@ -18,7 +17,6 @@ module UsersHelperTests
|
|
18
17
|
end
|
19
18
|
|
20
19
|
describe 'nested 1' do
|
21
|
-
|
22
20
|
it('works') { skip }
|
23
21
|
|
24
22
|
it 'can find the helper_class' do
|
@@ -26,13 +24,9 @@ module UsersHelperTests
|
|
26
24
|
end
|
27
25
|
|
28
26
|
describe 'nested 2' do
|
29
|
-
|
30
27
|
it('works') { skip }
|
31
|
-
|
32
28
|
end
|
33
|
-
|
34
29
|
end
|
35
|
-
|
36
30
|
end
|
37
31
|
end
|
38
32
|
|
@@ -44,12 +38,12 @@ class UsersHelperTest < ActionView::TestCase
|
|
44
38
|
end
|
45
39
|
describe 'level 1' do
|
46
40
|
it 'reflects' do
|
47
|
-
described_class.must_equal
|
41
|
+
described_class.must_equal UsersHelper
|
48
42
|
self.class.described_class.must_equal UsersHelper
|
49
43
|
end
|
50
44
|
describe 'level 2' do
|
51
45
|
it 'reflects' do
|
52
|
-
described_class.must_equal
|
46
|
+
described_class.must_equal UsersHelper
|
53
47
|
self.class.described_class.must_equal UsersHelper
|
54
48
|
end
|
55
49
|
end
|
@@ -1,13 +1,12 @@
|
|
1
1
|
module MiniTestSpecRails
|
2
2
|
module SharedTestCaseBehavior
|
3
|
-
|
4
3
|
extend ActiveSupport::Concern
|
5
4
|
|
6
5
|
included do
|
7
6
|
before { setup_dummy_schema }
|
8
7
|
let(:app) { Dummy::Application }
|
9
|
-
let(:user_ken) { User.create! :
|
10
|
-
let(:user_post) { Post.create! :
|
8
|
+
let(:user_ken) { User.create! email: 'ken@metaskills.net' }
|
9
|
+
let(:user_post) { Post.create! title: 'Test Title', body: 'Test body. Test body.', user: user_ken }
|
11
10
|
end
|
12
11
|
|
13
12
|
private
|
@@ -19,17 +18,15 @@ module MiniTestSpecRails
|
|
19
18
|
def setup_dummy_schema
|
20
19
|
ActiveRecord::Base.class_eval do
|
21
20
|
connection.instance_eval do
|
22
|
-
create_table :users, :
|
21
|
+
create_table :users, force: true do |t|
|
23
22
|
t.string :email
|
24
23
|
end
|
25
|
-
create_table :posts, :
|
24
|
+
create_table :posts, force: true do |t|
|
26
25
|
t.string :title, :body
|
27
26
|
t.integer :user_id
|
28
27
|
end
|
29
28
|
end
|
30
29
|
end
|
31
30
|
end
|
32
|
-
|
33
31
|
end
|
34
32
|
end
|
35
|
-
|
data/test/test_helper.rb
CHANGED
data/test/test_helper_dummy.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-spec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -80,8 +80,9 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description:
|
84
|
-
|
83
|
+
description: |-
|
84
|
+
The minitest-spec-rails gem makes it easy to use the \
|
85
|
+
MiniTest::Spec DSL within your existing Rails test suite.
|
85
86
|
email:
|
86
87
|
- ken@metaskills.net
|
87
88
|
executables: []
|
@@ -89,6 +90,7 @@ extensions: []
|
|
89
90
|
extra_rdoc_files: []
|
90
91
|
files:
|
91
92
|
- ".gitignore"
|
93
|
+
- ".rubocop.yml"
|
92
94
|
- ".travis.yml"
|
93
95
|
- Appraisals
|
94
96
|
- CHANGELOG.md
|
@@ -103,6 +105,8 @@ files:
|
|
103
105
|
- gemfiles/rails42.gemfile.lock
|
104
106
|
- gemfiles/rails50.gemfile
|
105
107
|
- gemfiles/rails50.gemfile.lock
|
108
|
+
- gemfiles/rails51.gemfile
|
109
|
+
- gemfiles/rails51.gemfile.lock
|
106
110
|
- lib/minitest-spec-rails.rb
|
107
111
|
- lib/minitest-spec-rails/dsl.rb
|
108
112
|
- lib/minitest-spec-rails/init/action_controller.rb
|