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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +26 -0
  3. data/.travis.yml +8 -5
  4. data/Appraisals +9 -2
  5. data/CHANGELOG.md +5 -1
  6. data/Gemfile +0 -1
  7. data/README.md +17 -28
  8. data/Rakefile +4 -5
  9. data/gemfiles/rails41.gemfile.lock +44 -45
  10. data/gemfiles/rails42.gemfile.lock +64 -67
  11. data/gemfiles/rails50.gemfile +2 -1
  12. data/gemfiles/rails50.gemfile.lock +75 -80
  13. data/gemfiles/rails51.gemfile +8 -0
  14. data/gemfiles/rails51.gemfile.lock +128 -0
  15. data/lib/minitest-spec-rails/dsl.rb +5 -9
  16. data/lib/minitest-spec-rails/init/action_controller.rb +3 -7
  17. data/lib/minitest-spec-rails/init/action_dispatch.rb +1 -3
  18. data/lib/minitest-spec-rails/init/action_mailer.rb +2 -7
  19. data/lib/minitest-spec-rails/init/action_view.rb +1 -5
  20. data/lib/minitest-spec-rails/init/active_job.rb +3 -8
  21. data/lib/minitest-spec-rails/init/active_support.rb +8 -10
  22. data/lib/minitest-spec-rails/init/mini_shoulda.rb +2 -6
  23. data/lib/minitest-spec-rails/railtie.rb +21 -21
  24. data/lib/minitest-spec-rails/version.rb +1 -1
  25. data/minitest-spec-rails.gemspec +5 -5
  26. data/test/cases/action_controller_test.rb +7 -10
  27. data/test/cases/action_dispatch_test.rb +10 -13
  28. data/test/cases/action_mailer_test.rb +7 -10
  29. data/test/cases/action_view_test.rb +13 -16
  30. data/test/cases/active_job_test.rb +38 -36
  31. data/test/cases/active_support_test.rb +22 -12
  32. data/test/cases/mini_shoulda_test.rb +0 -4
  33. data/test/dummy_app/app/controllers/application_controller.rb +1 -3
  34. data/test/dummy_app/app/controllers/users_controller.rb +1 -3
  35. data/test/dummy_app/app/helpers/application_helper.rb +0 -1
  36. data/test/dummy_app/app/helpers/foos_helper.rb +3 -1
  37. data/test/dummy_app/app/helpers/users_helper.rb +1 -3
  38. data/test/dummy_app/app/mailers/user_mailer.rb +2 -4
  39. data/test/dummy_app/app/models/post.rb +0 -3
  40. data/test/dummy_app/app/models/user.rb +0 -3
  41. data/test/dummy_app/config/routes.rb +1 -1
  42. data/test/dummy_app/init.rb +2 -4
  43. data/test/dummy_tests/application_controller_test.rb +3 -9
  44. data/test/dummy_tests/foos_helper_test.rb +0 -3
  45. data/test/dummy_tests/integration_test.rb +2 -8
  46. data/test/dummy_tests/special_users_controller_test.rb +0 -2
  47. data/test/dummy_tests/user_mailer_test.rb +4 -10
  48. data/test/dummy_tests/user_test.rb +2 -8
  49. data/test/dummy_tests/users_controller_test.rb +1 -3
  50. data/test/dummy_tests/users_helper_test.rb +2 -8
  51. data/test/support/shared_test_case_behavior.rb +4 -7
  52. data/test/test_helper.rb +0 -3
  53. data/test/test_helper_dummy.rb +5 -6
  54. 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 UsersHelper
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 UsersHelper
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! :email => 'ken@metaskills.net' }
10
- let(:user_post) { Post.create! :title => 'Test Title', :body => 'Test body. Test body.', :user => user_ken}
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, :force => true do |t|
21
+ create_table :users, force: true do |t|
23
22
  t.string :email
24
23
  end
25
- create_table :posts, :force => true do |t|
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
-
@@ -3,9 +3,6 @@ require 'support/shared_test_case_behavior'
3
3
 
4
4
  module MiniTestSpecRails
5
5
  class TestCase < MiniTest::Spec
6
-
7
6
  include MiniTestSpecRails::SharedTestCaseBehavior
8
-
9
-
10
7
  end
11
8
  end
@@ -1,9 +1,8 @@
1
1
  require 'test_helper'
2
2
 
3
- class ActiveSupport::TestCase
4
-
5
- fixtures :all
6
- include MiniTestSpecRails::SharedTestCaseBehavior
7
-
8
-
3
+ module ActiveSupport
4
+ class TestCase
5
+ fixtures :all
6
+ include MiniTestSpecRails::SharedTestCaseBehavior
7
+ end
9
8
  end
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.0
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: 2016-06-15 00:00:00.000000000 Z
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: The minitest-spec-rails gem makes it easy to use the MiniTest::Spec DSL
84
- within your existing Rails 3 or 4 test suite.
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