shoulda-context 1.2.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +0 -1
  3. data/.hound.yml +3 -0
  4. data/.rubocop.yml +190 -0
  5. data/.ruby-version +1 -1
  6. data/.travis.yml +36 -2
  7. data/Appraisals +100 -29
  8. data/CHANGELOG.md +29 -0
  9. data/Gemfile +15 -1
  10. data/Gemfile.lock +70 -0
  11. data/MIT-LICENSE +1 -1
  12. data/README.md +140 -29
  13. data/Rakefile +20 -15
  14. data/bin/install_gems_in_all_appraisals +16 -0
  15. data/bin/run_all_tests +16 -0
  16. data/bin/setup +190 -0
  17. data/bin/supported_ruby_versions +7 -0
  18. data/bin/update_gem_in_all_appraisals +17 -0
  19. data/bin/update_gems_in_all_appraisals +16 -0
  20. data/{bin → exe}/convert_to_should_syntax +0 -0
  21. data/gemfiles/rails_4_2.gemfile +35 -0
  22. data/gemfiles/rails_4_2.gemfile.lock +234 -0
  23. data/gemfiles/rails_5_0.gemfile +33 -0
  24. data/gemfiles/rails_5_0.gemfile.lock +226 -0
  25. data/gemfiles/rails_5_1.gemfile +34 -0
  26. data/gemfiles/rails_5_1.gemfile.lock +242 -0
  27. data/gemfiles/rails_5_2.gemfile +36 -0
  28. data/gemfiles/rails_5_2.gemfile.lock +261 -0
  29. data/gemfiles/rails_6_0.gemfile +38 -0
  30. data/gemfiles/rails_6_0.gemfile.lock +286 -0
  31. data/lib/shoulda/context.rb +13 -16
  32. data/lib/shoulda/context/assertions.rb +16 -13
  33. data/lib/shoulda/context/configuration.rb +19 -0
  34. data/lib/shoulda/context/context.rb +33 -307
  35. data/lib/shoulda/context/dsl.rb +279 -0
  36. data/lib/shoulda/context/rails_test_unit_reporter_patch.rb +21 -0
  37. data/lib/shoulda/context/railtie.rb +14 -0
  38. data/lib/shoulda/context/test_framework_detection.rb +4 -5
  39. data/lib/shoulda/context/version.rb +1 -1
  40. data/lib/shoulda/context/world.rb +22 -0
  41. data/shoulda-context.gemspec +11 -18
  42. data/test/fake_rails_root/test/shoulda_macros/custom_macro.rb +1 -1
  43. data/test/fake_rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +1 -2
  44. data/test/fake_rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +1 -2
  45. data/test/shoulda/autoload_macro_test.rb +1 -1
  46. data/test/shoulda/context_test.rb +92 -53
  47. data/test/shoulda/convert_to_should_syntax_test.rb +5 -7
  48. data/test/shoulda/helpers_test.rb +24 -59
  49. data/test/shoulda/railtie_test.rb +43 -0
  50. data/test/shoulda/rerun_snippet_test.rb +45 -0
  51. data/test/shoulda/should_test.rb +163 -24
  52. data/test/shoulda/test_framework_detection_test.rb +64 -71
  53. data/test/support/current_bundle.rb +61 -0
  54. data/test/support/rails_application_with_shoulda_context.rb +46 -0
  55. data/test/support/snowglobe.rb +5 -0
  56. data/test/test_helper.rb +43 -11
  57. metadata +46 -142
  58. data/gemfiles/minitest_4_x.gemfile +0 -7
  59. data/gemfiles/minitest_4_x.gemfile.lock +0 -96
  60. data/gemfiles/minitest_5_x.gemfile +0 -7
  61. data/gemfiles/minitest_5_x.gemfile.lock +0 -102
  62. data/gemfiles/rails_3_0.gemfile +0 -8
  63. data/gemfiles/rails_3_0.gemfile.lock +0 -93
  64. data/gemfiles/rails_3_1.gemfile +0 -10
  65. data/gemfiles/rails_3_1.gemfile.lock +0 -114
  66. data/gemfiles/rails_3_2.gemfile +0 -10
  67. data/gemfiles/rails_3_2.gemfile.lock +0 -112
  68. data/gemfiles/rails_4_0.gemfile +0 -10
  69. data/gemfiles/rails_4_0.gemfile.lock +0 -107
  70. data/gemfiles/rails_4_1.gemfile +0 -10
  71. data/gemfiles/rails_4_1.gemfile.lock +0 -119
  72. data/gemfiles/test_unit.gemfile +0 -7
  73. data/gemfiles/test_unit.gemfile.lock +0 -95
  74. data/init.rb +0 -1
  75. data/rails/init.rb +0 -4
@@ -1,112 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- shoulda-context (1.1.6)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- actionmailer (3.2.13)
10
- actionpack (= 3.2.13)
11
- mail (~> 2.5.3)
12
- actionpack (3.2.13)
13
- activemodel (= 3.2.13)
14
- activesupport (= 3.2.13)
15
- builder (~> 3.0.0)
16
- erubis (~> 2.7.0)
17
- journey (~> 1.0.4)
18
- rack (~> 1.4.5)
19
- rack-cache (~> 1.2)
20
- rack-test (~> 0.6.1)
21
- sprockets (~> 2.2.1)
22
- activemodel (3.2.13)
23
- activesupport (= 3.2.13)
24
- builder (~> 3.0.0)
25
- activerecord (3.2.13)
26
- activemodel (= 3.2.13)
27
- activesupport (= 3.2.13)
28
- arel (~> 3.0.2)
29
- tzinfo (~> 0.3.29)
30
- activeresource (3.2.13)
31
- activemodel (= 3.2.13)
32
- activesupport (= 3.2.13)
33
- activesupport (3.2.13)
34
- i18n (= 0.6.1)
35
- multi_json (~> 1.0)
36
- appraisal (0.5.2)
37
- bundler
38
- rake
39
- arel (3.0.3)
40
- builder (3.0.4)
41
- erubis (2.7.0)
42
- hike (1.2.3)
43
- i18n (0.6.1)
44
- journey (1.0.4)
45
- jquery-rails (3.1.0)
46
- railties (>= 3.0, < 5.0)
47
- thor (>= 0.14, < 2.0)
48
- json (1.8.1)
49
- mail (2.5.4)
50
- mime-types (~> 1.16)
51
- treetop (~> 1.4.8)
52
- mime-types (1.25.1)
53
- mocha (0.9.12)
54
- multi_json (1.9.2)
55
- polyglot (0.3.4)
56
- rack (1.4.5)
57
- rack-cache (1.2)
58
- rack (>= 0.4)
59
- rack-ssl (1.3.3)
60
- rack
61
- rack-test (0.6.2)
62
- rack (>= 1.0)
63
- rails (3.2.13)
64
- actionmailer (= 3.2.13)
65
- actionpack (= 3.2.13)
66
- activerecord (= 3.2.13)
67
- activeresource (= 3.2.13)
68
- activesupport (= 3.2.13)
69
- bundler (~> 1.0)
70
- railties (= 3.2.13)
71
- railties (3.2.13)
72
- actionpack (= 3.2.13)
73
- activesupport (= 3.2.13)
74
- rack-ssl (~> 1.3.2)
75
- rake (>= 0.8.7)
76
- rdoc (~> 3.4)
77
- thor (>= 0.14.6, < 2.0)
78
- rake (10.2.1)
79
- rdoc (3.12.2)
80
- json (~> 1.4)
81
- sass (3.3.4)
82
- sass-rails (3.2.6)
83
- railties (~> 3.2.0)
84
- sass (>= 3.1.10)
85
- tilt (~> 1.3)
86
- sprockets (2.2.2)
87
- hike (~> 1.2)
88
- multi_json (~> 1.0)
89
- rack (~> 1.0)
90
- tilt (~> 1.1, != 1.3.0)
91
- sqlite3 (1.3.9)
92
- test-unit (2.1.2)
93
- thor (0.19.1)
94
- tilt (1.4.1)
95
- treetop (1.4.15)
96
- polyglot
97
- polyglot (>= 0.3.1)
98
- tzinfo (0.3.38)
99
-
100
- PLATFORMS
101
- ruby
102
-
103
- DEPENDENCIES
104
- appraisal (~> 0.5)
105
- jquery-rails
106
- mocha (~> 0.9.10)
107
- rails (~> 3.2.0)
108
- rake
109
- sass-rails
110
- shoulda-context!
111
- sqlite3
112
- test-unit (~> 2.1.0)
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "rails", "~> 4.0.0"
6
- gem "jquery-rails"
7
- gem "sass-rails"
8
- gem "sqlite3"
9
-
10
- gemspec :path=>"../"
@@ -1,107 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- shoulda-context (1.1.6)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- actionmailer (4.0.3)
10
- actionpack (= 4.0.3)
11
- mail (~> 2.5.4)
12
- actionpack (4.0.3)
13
- activesupport (= 4.0.3)
14
- builder (~> 3.1.0)
15
- erubis (~> 2.7.0)
16
- rack (~> 1.5.2)
17
- rack-test (~> 0.6.2)
18
- activemodel (4.0.3)
19
- activesupport (= 4.0.3)
20
- builder (~> 3.1.0)
21
- activerecord (4.0.3)
22
- activemodel (= 4.0.3)
23
- activerecord-deprecated_finders (~> 1.0.2)
24
- activesupport (= 4.0.3)
25
- arel (~> 4.0.0)
26
- activerecord-deprecated_finders (1.0.3)
27
- activesupport (4.0.3)
28
- i18n (~> 0.6, >= 0.6.4)
29
- minitest (~> 4.2)
30
- multi_json (~> 1.3)
31
- thread_safe (~> 0.1)
32
- tzinfo (~> 0.3.37)
33
- appraisal (0.5.2)
34
- bundler
35
- rake
36
- arel (4.0.2)
37
- atomic (1.1.16)
38
- builder (3.1.4)
39
- erubis (2.7.0)
40
- hike (1.2.3)
41
- i18n (0.6.9)
42
- jquery-rails (3.1.0)
43
- railties (>= 3.0, < 5.0)
44
- thor (>= 0.14, < 2.0)
45
- mail (2.5.4)
46
- mime-types (~> 1.16)
47
- treetop (~> 1.4.8)
48
- mime-types (1.25.1)
49
- minitest (4.7.5)
50
- mocha (0.9.12)
51
- multi_json (1.9.2)
52
- polyglot (0.3.4)
53
- rack (1.5.2)
54
- rack-test (0.6.2)
55
- rack (>= 1.0)
56
- rails (4.0.3)
57
- actionmailer (= 4.0.3)
58
- actionpack (= 4.0.3)
59
- activerecord (= 4.0.3)
60
- activesupport (= 4.0.3)
61
- bundler (>= 1.3.0, < 2.0)
62
- railties (= 4.0.3)
63
- sprockets-rails (~> 2.0.0)
64
- railties (4.0.3)
65
- actionpack (= 4.0.3)
66
- activesupport (= 4.0.3)
67
- rake (>= 0.8.7)
68
- thor (>= 0.18.1, < 2.0)
69
- rake (10.2.1)
70
- sass (3.3.4)
71
- sass-rails (4.0.1)
72
- railties (>= 4.0.0, < 5.0)
73
- sass (>= 3.1.10)
74
- sprockets-rails (~> 2.0.0)
75
- sprockets (2.12.0)
76
- hike (~> 1.2)
77
- multi_json (~> 1.0)
78
- rack (~> 1.0)
79
- tilt (~> 1.1, != 1.3.0)
80
- sprockets-rails (2.0.1)
81
- actionpack (>= 3.0)
82
- activesupport (>= 3.0)
83
- sprockets (~> 2.8)
84
- sqlite3 (1.3.9)
85
- test-unit (2.1.2)
86
- thor (0.19.1)
87
- thread_safe (0.3.1)
88
- atomic (>= 1.1.7, < 2)
89
- tilt (1.4.1)
90
- treetop (1.4.15)
91
- polyglot
92
- polyglot (>= 0.3.1)
93
- tzinfo (0.3.38)
94
-
95
- PLATFORMS
96
- ruby
97
-
98
- DEPENDENCIES
99
- appraisal (~> 0.5)
100
- jquery-rails
101
- mocha (~> 0.9.10)
102
- rails (~> 4.0.0)
103
- rake
104
- sass-rails
105
- shoulda-context!
106
- sqlite3
107
- test-unit (~> 2.1.0)
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "rails", :github=>"rails/rails", :branch=>"4-1-stable"
6
- gem "jquery-rails"
7
- gem "sass-rails"
8
- gem "sqlite3"
9
-
10
- gemspec :path=>"../"
@@ -1,119 +0,0 @@
1
- GIT
2
- remote: git://github.com/rails/rails.git
3
- revision: 5ac4d6e8dd6f11b3291ce85d455ab5aff0abdbfe
4
- branch: 4-1-stable
5
- specs:
6
- actionmailer (4.1.0.rc1)
7
- actionpack (= 4.1.0.rc1)
8
- actionview (= 4.1.0.rc1)
9
- mail (~> 2.5.4)
10
- actionpack (4.1.0.rc1)
11
- actionview (= 4.1.0.rc1)
12
- activesupport (= 4.1.0.rc1)
13
- rack (~> 1.5.2)
14
- rack-test (~> 0.6.2)
15
- actionview (4.1.0.rc1)
16
- activesupport (= 4.1.0.rc1)
17
- builder (~> 3.1)
18
- erubis (~> 2.7.0)
19
- activemodel (4.1.0.rc1)
20
- activesupport (= 4.1.0.rc1)
21
- builder (~> 3.1)
22
- activerecord (4.1.0.rc1)
23
- activemodel (= 4.1.0.rc1)
24
- activesupport (= 4.1.0.rc1)
25
- arel (~> 5.0.0)
26
- activesupport (4.1.0.rc1)
27
- i18n (~> 0.6, >= 0.6.9)
28
- json (~> 1.7, >= 1.7.7)
29
- minitest (~> 5.1)
30
- thread_safe (~> 0.1)
31
- tzinfo (~> 1.1)
32
- rails (4.1.0.rc1)
33
- actionmailer (= 4.1.0.rc1)
34
- actionpack (= 4.1.0.rc1)
35
- actionview (= 4.1.0.rc1)
36
- activemodel (= 4.1.0.rc1)
37
- activerecord (= 4.1.0.rc1)
38
- activesupport (= 4.1.0.rc1)
39
- bundler (>= 1.3.0, < 2.0)
40
- railties (= 4.1.0.rc1)
41
- sprockets-rails (~> 2.0.0)
42
- railties (4.1.0.rc1)
43
- actionpack (= 4.1.0.rc1)
44
- activesupport (= 4.1.0.rc1)
45
- rake (>= 0.8.7)
46
- thor (>= 0.18.1, < 2.0)
47
-
48
- PATH
49
- remote: ../
50
- specs:
51
- shoulda-context (1.1.6)
52
-
53
- GEM
54
- remote: http://rubygems.org/
55
- specs:
56
- appraisal (0.5.2)
57
- bundler
58
- rake
59
- arel (5.0.0)
60
- atomic (1.1.16)
61
- builder (3.2.2)
62
- erubis (2.7.0)
63
- hike (1.2.3)
64
- i18n (0.6.9)
65
- jquery-rails (3.1.0)
66
- railties (>= 3.0, < 5.0)
67
- thor (>= 0.14, < 2.0)
68
- json (1.8.1)
69
- mail (2.5.4)
70
- mime-types (~> 1.16)
71
- treetop (~> 1.4.8)
72
- mime-types (1.25.1)
73
- minitest (5.3.1)
74
- mocha (0.9.12)
75
- multi_json (1.9.2)
76
- polyglot (0.3.4)
77
- rack (1.5.2)
78
- rack-test (0.6.2)
79
- rack (>= 1.0)
80
- rake (10.2.1)
81
- sass (3.3.4)
82
- sass-rails (4.0.1)
83
- railties (>= 4.0.0, < 5.0)
84
- sass (>= 3.1.10)
85
- sprockets-rails (~> 2.0.0)
86
- sprockets (2.12.0)
87
- hike (~> 1.2)
88
- multi_json (~> 1.0)
89
- rack (~> 1.0)
90
- tilt (~> 1.1, != 1.3.0)
91
- sprockets-rails (2.0.1)
92
- actionpack (>= 3.0)
93
- activesupport (>= 3.0)
94
- sprockets (~> 2.8)
95
- sqlite3 (1.3.9)
96
- test-unit (2.1.2)
97
- thor (0.19.1)
98
- thread_safe (0.3.1)
99
- atomic (>= 1.1.7, < 2)
100
- tilt (1.4.1)
101
- treetop (1.4.15)
102
- polyglot
103
- polyglot (>= 0.3.1)
104
- tzinfo (1.1.0)
105
- thread_safe (~> 0.1)
106
-
107
- PLATFORMS
108
- ruby
109
-
110
- DEPENDENCIES
111
- appraisal (~> 0.5)
112
- jquery-rails
113
- mocha (~> 0.9.10)
114
- rails!
115
- rake
116
- sass-rails
117
- shoulda-context!
118
- sqlite3
119
- test-unit (~> 2.1.0)
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "test-unit"
6
-
7
- gemspec :path=>"../"
@@ -1,95 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- shoulda-context (1.1.6)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- actionmailer (4.0.3)
10
- actionpack (= 4.0.3)
11
- mail (~> 2.5.4)
12
- actionpack (4.0.3)
13
- activesupport (= 4.0.3)
14
- builder (~> 3.1.0)
15
- erubis (~> 2.7.0)
16
- rack (~> 1.5.2)
17
- rack-test (~> 0.6.2)
18
- activemodel (4.0.3)
19
- activesupport (= 4.0.3)
20
- builder (~> 3.1.0)
21
- activerecord (4.0.3)
22
- activemodel (= 4.0.3)
23
- activerecord-deprecated_finders (~> 1.0.2)
24
- activesupport (= 4.0.3)
25
- arel (~> 4.0.0)
26
- activerecord-deprecated_finders (1.0.3)
27
- activesupport (4.0.3)
28
- i18n (~> 0.6, >= 0.6.4)
29
- minitest (~> 4.2)
30
- multi_json (~> 1.3)
31
- thread_safe (~> 0.1)
32
- tzinfo (~> 0.3.37)
33
- appraisal (0.5.2)
34
- bundler
35
- rake
36
- arel (4.0.2)
37
- atomic (1.1.16)
38
- builder (3.1.4)
39
- erubis (2.7.0)
40
- hike (1.2.3)
41
- i18n (0.6.9)
42
- mail (2.5.4)
43
- mime-types (~> 1.16)
44
- treetop (~> 1.4.8)
45
- mime-types (1.25.1)
46
- minitest (4.7.5)
47
- mocha (0.9.12)
48
- multi_json (1.9.2)
49
- polyglot (0.3.4)
50
- rack (1.5.2)
51
- rack-test (0.6.2)
52
- rack (>= 1.0)
53
- rails (4.0.3)
54
- actionmailer (= 4.0.3)
55
- actionpack (= 4.0.3)
56
- activerecord (= 4.0.3)
57
- activesupport (= 4.0.3)
58
- bundler (>= 1.3.0, < 2.0)
59
- railties (= 4.0.3)
60
- sprockets-rails (~> 2.0.0)
61
- railties (4.0.3)
62
- actionpack (= 4.0.3)
63
- activesupport (= 4.0.3)
64
- rake (>= 0.8.7)
65
- thor (>= 0.18.1, < 2.0)
66
- rake (10.2.1)
67
- sprockets (2.12.0)
68
- hike (~> 1.2)
69
- multi_json (~> 1.0)
70
- rack (~> 1.0)
71
- tilt (~> 1.1, != 1.3.0)
72
- sprockets-rails (2.0.1)
73
- actionpack (>= 3.0)
74
- activesupport (>= 3.0)
75
- sprockets (~> 2.8)
76
- test-unit (2.5.5)
77
- thor (0.19.1)
78
- thread_safe (0.3.1)
79
- atomic (>= 1.1.7, < 2)
80
- tilt (1.4.1)
81
- treetop (1.4.15)
82
- polyglot
83
- polyglot (>= 0.3.1)
84
- tzinfo (0.3.38)
85
-
86
- PLATFORMS
87
- ruby
88
-
89
- DEPENDENCIES
90
- appraisal (~> 0.5)
91
- mocha (~> 0.9.10)
92
- rails (>= 3.0)
93
- rake
94
- shoulda-context!
95
- test-unit