File tree Expand file tree Collapse file tree 15 files changed +92
-14
lines changed
spec/rspec/rails/matchers Expand file tree Collapse file tree 15 files changed +92
-14
lines changed Original file line number Diff line number Diff line change 1
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
1
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
2
2
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3
3
4
4
# This file contains defaults for RSpec projects. Individual projects
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ cache: bundler
23
23
bundler_args : " --binstubs --path ../bundle --retry=3 --jobs=3"
24
24
25
25
before_install :
26
- - gem update --system 2.7.8
27
- - gem install bundler
26
+ - script/update_rubygems_and_install_bundler
27
+ - script/downgrade_bundler_on_old_rails
28
28
- script/clone_all_rspec_repos
29
29
30
30
before_script :
Original file line number Diff line number Diff line change 1
1
### Development
2
- [ Full Changelog] ( http://github.com/rspec/rspec-rails/compare/v3.8.1...master )
2
+ [ Full Changelog] ( http://github.com/rspec/rspec-rails/compare/v3.8.2...master )
3
+
4
+ ### 3.8.2 / 2019-01-13
5
+ [ Full Changelog] ( http://github.com/rspec/rspec-rails/compare/v3.8.1...v3.8.2 )
3
6
4
7
Bug Fixes:
5
8
6
9
* Fix issue with generator for preview specs where ` Mailer ` would be duplicated
7
10
in the name. (Kohei Sugi, #2037 )
8
11
* Fix the request spec generator to handle namespaced files. (Kohei Sugi, #2057 )
12
+ * Further truncate system test filenames to handle cases when extra words are
13
+ prepended. (Takumi Kaji, #2058 )
14
+ * Backport: Make the ` ActiveJob ` matchers fail when multiple jobs are queued
15
+ for negated matches. e.g. `expect { job; job; }.to_not have_enqueued_job
16
+ (Emric Istanful, #2069 )
9
17
10
18
### 3.8.1 / 2018-10-23
11
19
[ Full Changelog] ( http://github.com/rspec/rspec-rails/compare/v3.8.0...v3.8.1 )
Original file line number Diff line number Diff line change 1
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
1
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
2
2
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3
3
4
4
version : " {build}"
@@ -33,7 +33,6 @@ test_script:
33
33
34
34
environment :
35
35
matrix :
36
- - ruby_version : 193
37
36
- ruby_version : 200
38
37
- ruby_version : 21
39
38
- ruby_version : 22
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def method_name
37
37
@method_name ||= [
38
38
self . class . name . underscore ,
39
39
RSpec . current_example . description . underscore
40
- ] . join ( "_" ) . tr ( CHARS_TO_TRANSLATE . join , "_" ) [ 0 ...251 ] + "_#{ rand ( 1000 ) } "
40
+ ] . join ( "_" ) . tr ( CHARS_TO_TRANSLATE . join , "_" ) [ 0 ...200 ] + "_#{ rand ( 1000 ) } "
41
41
end
42
42
43
43
# Delegates to `Rails.application`.
Original file line number Diff line number Diff line change @@ -197,6 +197,12 @@ def matches?(proc)
197
197
198
198
check ( in_block_jobs )
199
199
end
200
+
201
+ def does_not_match? ( proc )
202
+ set_expected_number ( :at_least , 1 )
203
+
204
+ !matches? ( proc )
205
+ end
200
206
end
201
207
202
208
# @private
@@ -205,6 +211,12 @@ def matches?(job)
205
211
@job = job
206
212
check ( queue_adapter . enqueued_jobs )
207
213
end
214
+
215
+ def does_not_match? ( proc )
216
+ set_expected_number ( :at_least , 1 )
217
+
218
+ !matches? ( proc )
219
+ end
208
220
end
209
221
end
210
222
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module Rails
3
3
# Version information for RSpec Rails.
4
4
module Version
5
5
# Current version of RSpec Rails, in semantic versioning format.
6
- STRING = '3.8.1 '
6
+ STRING = '3.8.2 '
7
7
end
8
8
end
9
9
end
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
2
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
3
3
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
4
4
5
5
set -e
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # This file was generated on 2019-01-03T20:34:23+00:00 from the rspec-dev repo.
3
+ # DO NOT modify it by hand as your changes will get lost the next time it is generated.
4
+
5
+ set -e
6
+ source script/functions.sh
7
+
8
+ if ruby -e " exit(ENV['RAILS_VERSION'].to_f < 5)" ; then
9
+ # On Rails versions less than 5, Bundler 2.0 is not supported
10
+ echo " Warning dowgrading to older version of Bundler"
11
+ gem uninstall -aIx bundler
12
+
13
+ # this only works on Ruby 2.3 which is luckily the version we need to fix
14
+ if is_ruby_23_plus; then
15
+ rvm @global do gem uninstall -aIx bundler
16
+ fi
17
+
18
+ gem install bundler -v ' 1.17.3'
19
+ fi
Original file line number Diff line number Diff line change 1
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
1
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
2
2
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3
3
4
4
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
Original file line number Diff line number Diff line change 1
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
1
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
2
2
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3
3
4
4
function is_mri {
@@ -57,6 +57,14 @@ function is_mri_2plus {
57
57
fi
58
58
}
59
59
60
+ function is_ruby_23_plus {
61
+ if ruby -e " exit(RUBY_VERSION.to_f >= 2.3)" ; then
62
+ return 0
63
+ else
64
+ return 1
65
+ fi
66
+ }
67
+
60
68
function rspec_support_compatible {
61
69
if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance" ] && [ " $MAINTENANCE_BRANCH " != " 2-14-maintenance" ]; then
62
70
return 0
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
2
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
3
3
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
4
4
5
5
set -e
Original file line number Diff line number Diff line change 1
- # This file was generated on 2018-04-03T19:49:13+10 :00 from the rspec-dev repo.
1
+ # This file was generated on 2019-01-03T20:34:23+00 :00 from the rspec-dev repo.
2
2
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3
3
4
4
# Taken from:
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # This file was generated on 2019-01-03T20:34:23+00:00 from the rspec-dev repo.
3
+ # DO NOT modify it by hand as your changes will get lost the next time it is generated.
4
+
5
+ set -e
6
+ source script/functions.sh
7
+
8
+ if is_ruby_23_plus; then
9
+ gem update --system
10
+ gem install bundler
11
+ else
12
+ echo " Warning installing older versions of Rubygems / Bundler"
13
+ gem update --system ' 2.7.8'
14
+ gem install bundler -v ' 1.17.3'
15
+ fi
Original file line number Diff line number Diff line change @@ -122,7 +122,16 @@ def self.name; "LoggingJob"; end
122
122
it "fails when negated and job is enqueued" do
123
123
expect {
124
124
expect { heavy_lifting_job . perform_later } . not_to have_enqueued_job
125
- } . to raise_error ( /expected not to enqueue exactly 1 jobs, but enqueued 1/ )
125
+ } . to raise_error ( /expected not to enqueue at least 1 jobs, but enqueued 1/ )
126
+ end
127
+
128
+ it "fails when negated and several jobs enqueued" do
129
+ expect {
130
+ expect {
131
+ heavy_lifting_job . perform_later
132
+ heavy_lifting_job . perform_later
133
+ } . not_to have_enqueued_job
134
+ } . to raise_error ( /expected not to enqueue at least 1 jobs, but enqueued 2/ )
126
135
end
127
136
128
137
it "passes with job name" do
@@ -344,5 +353,13 @@ def self.name; "LoggingJob"; end
344
353
expect ( heavy_lifting_job ) . to have_been_enqueued
345
354
} . to raise_error ( /expected to enqueue exactly 1 jobs, but enqueued 0/ )
346
355
end
356
+
357
+ it "fails when negated and several jobs enqueued" do
358
+ heavy_lifting_job . perform_later
359
+ heavy_lifting_job . perform_later
360
+ expect {
361
+ expect ( heavy_lifting_job ) . not_to have_been_enqueued
362
+ } . to raise_error ( /expected not to enqueue at least 1 jobs, but enqueued 2/ )
363
+ end
347
364
end
348
365
end
You can’t perform that action at this time.
0 commit comments