rspec-expectations 2.12.1 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +31 -0
- data/README.md +1 -1
- data/features/built_in_matchers/be.feature +6 -4
- data/features/built_in_matchers/be_within.feature +3 -1
- data/features/built_in_matchers/cover.feature +2 -0
- data/features/built_in_matchers/end_with.feature +2 -0
- data/features/built_in_matchers/equality.feature +9 -15
- data/features/built_in_matchers/exist.feature +2 -0
- data/features/built_in_matchers/expect_error.feature +14 -8
- data/features/built_in_matchers/have.feature +11 -5
- data/features/built_in_matchers/include.feature +53 -0
- data/features/built_in_matchers/match.feature +2 -0
- data/features/built_in_matchers/operators.feature +17 -11
- data/features/built_in_matchers/predicates.feature +21 -13
- data/features/built_in_matchers/respond_to.feature +7 -1
- data/features/built_in_matchers/satisfy.feature +2 -0
- data/features/built_in_matchers/start_with.feature +2 -0
- data/features/built_in_matchers/throw_symbol.feature +6 -0
- data/features/built_in_matchers/types.feature +8 -6
- data/lib/rspec/expectations/deprecation.rb +1 -1
- data/lib/rspec/expectations/differ.rb +8 -8
- data/lib/rspec/expectations/fail_with.rb +17 -3
- data/lib/rspec/expectations/syntax.rb +46 -0
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers/built_in/be.rb +7 -3
- data/lib/rspec/matchers/built_in/be_within.rb +13 -4
- data/lib/rspec/matchers/built_in/change.rb +2 -2
- data/lib/rspec/matchers/built_in/equal.rb +5 -1
- data/lib/rspec/matchers/built_in/exist.rb +1 -1
- data/lib/rspec/matchers/built_in/have.rb +8 -8
- data/lib/rspec/matchers/built_in/include.rb +19 -3
- data/lib/rspec/matchers/built_in/respond_to.rb +1 -1
- data/lib/rspec/matchers/extensions/instance_eval_with_args.rb +1 -1
- data/lib/rspec/matchers/matcher.rb +4 -3
- data/lib/rspec/matchers/operator_matcher.rb +1 -1
- data/lib/rspec/matchers/pretty.rb +5 -1
- data/spec/rspec/expectations/differ_spec.rb +8 -15
- data/spec/rspec/expectations/expectation_target_spec.rb +18 -8
- data/spec/rspec/expectations/extensions/kernel_spec.rb +15 -15
- data/spec/rspec/expectations/fail_with_spec.rb +41 -16
- data/spec/rspec/expectations/handler_spec.rb +13 -13
- data/spec/rspec/expectations/syntax_spec.rb +70 -8
- data/spec/rspec/matchers/base_matcher_spec.rb +14 -12
- data/spec/rspec/matchers/be_close_spec.rb +1 -1
- data/spec/rspec/matchers/be_instance_of_spec.rb +14 -8
- data/spec/rspec/matchers/be_kind_of_spec.rb +12 -8
- data/spec/rspec/matchers/be_spec.rb +212 -148
- data/spec/rspec/matchers/be_within_spec.rb +91 -42
- data/spec/rspec/matchers/change_spec.rb +52 -38
- data/spec/rspec/matchers/configuration_spec.rb +19 -15
- data/spec/rspec/matchers/cover_spec.rb +19 -19
- data/spec/rspec/matchers/description_generation_spec.rb +86 -86
- data/spec/rspec/matchers/dsl_spec.rb +7 -7
- data/spec/rspec/matchers/eq_spec.rb +17 -11
- data/spec/rspec/matchers/eql_spec.rb +10 -10
- data/spec/rspec/matchers/equal_spec.rb +27 -9
- data/spec/rspec/matchers/exist_spec.rb +35 -21
- data/spec/rspec/matchers/has_spec.rb +33 -29
- data/spec/rspec/matchers/have_spec.rb +165 -151
- data/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
- data/spec/rspec/matchers/include_spec.rb +282 -124
- data/spec/rspec/matchers/match_array_spec.rb +90 -49
- data/spec/rspec/matchers/match_spec.rb +21 -21
- data/spec/rspec/matchers/matcher_spec.rb +85 -48
- data/spec/rspec/matchers/matchers_spec.rb +12 -6
- data/spec/rspec/matchers/method_missing_spec.rb +5 -1
- data/spec/rspec/matchers/operator_matcher_spec.rb +216 -237
- data/spec/rspec/matchers/raise_error_spec.rb +132 -132
- data/spec/rspec/matchers/respond_to_spec.rb +109 -112
- data/spec/rspec/matchers/satisfy_spec.rb +16 -16
- data/spec/rspec/matchers/start_with_end_with_spec.rb +36 -32
- data/spec/rspec/matchers/throw_symbol_spec.rb +24 -24
- data/spec/rspec/matchers/yield_spec.rb +7 -7
- data/spec/spec_helper.rb +46 -19
- data/spec/support/in_sub_process.rb +27 -20
- metadata +81 -83
@@ -1,31 +1,38 @@
|
|
1
1
|
module InSubProcess
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
if RUBY_PLATFORM == 'java'
|
3
|
+
def in_sub_process
|
4
|
+
pending "This spec requires forking to work properly, " +
|
5
|
+
"and JRuby does not support forking"
|
6
|
+
end
|
7
|
+
else
|
8
|
+
# Useful as a way to isolate a global change to a subprocess.
|
9
|
+
def in_sub_process
|
10
|
+
readme, writeme = IO.pipe
|
5
11
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
pid = Process.fork do
|
13
|
+
value = nil
|
14
|
+
begin
|
15
|
+
yield
|
16
|
+
rescue => e
|
17
|
+
value = e
|
18
|
+
end
|
13
19
|
|
14
|
-
|
20
|
+
writeme.write Marshal.dump(value)
|
21
|
+
|
22
|
+
readme.close
|
23
|
+
writeme.close
|
24
|
+
exit! # prevent at_exit hooks from running (e.g. minitest)
|
25
|
+
end
|
15
26
|
|
16
|
-
readme.close
|
17
27
|
writeme.close
|
18
|
-
|
19
|
-
end
|
28
|
+
Process.waitpid(pid)
|
20
29
|
|
21
|
-
|
22
|
-
|
30
|
+
if exception = Marshal.load(readme.read)
|
31
|
+
raise exception
|
32
|
+
end
|
23
33
|
|
24
|
-
|
25
|
-
raise exception
|
34
|
+
readme.close
|
26
35
|
end
|
27
|
-
|
28
|
-
readme.close
|
29
36
|
end
|
30
37
|
end
|
31
38
|
|
metadata
CHANGED
@@ -1,96 +1,93 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-expectations
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
hash: 61
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 2
|
8
|
-
- 12
|
9
|
-
- 1
|
10
|
-
version: 2.12.1
|
5
|
+
version: 2.13.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Steven Baker
|
14
9
|
- David Chelimsky
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
hash: 21
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 1
|
31
|
-
- 3
|
13
|
+
date: 2013-02-23 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ! '>='
|
19
|
+
- !ruby/object:Gem::Version
|
32
20
|
version: 1.1.3
|
21
|
+
- - <
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '2.0'
|
24
|
+
none: false
|
33
25
|
prerelease: false
|
34
|
-
type: :runtime
|
35
26
|
name: diff-lcs
|
36
|
-
requirement:
|
37
|
-
|
38
|
-
|
27
|
+
requirement: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 1.1.3
|
32
|
+
- - <
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.0'
|
39
35
|
none: false
|
40
|
-
|
36
|
+
type: :runtime
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
41
40
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 79
|
44
|
-
segments:
|
45
|
-
- 10
|
46
|
-
- 0
|
47
|
-
- 0
|
41
|
+
- !ruby/object:Gem::Version
|
48
42
|
version: 10.0.0
|
43
|
+
none: false
|
49
44
|
prerelease: false
|
50
|
-
type: :development
|
51
45
|
name: rake
|
52
|
-
requirement:
|
53
|
-
|
54
|
-
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ~>
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 10.0.0
|
55
51
|
none: false
|
56
|
-
|
52
|
+
type: :development
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
57
56
|
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
hash: 1
|
60
|
-
segments:
|
61
|
-
- 1
|
62
|
-
- 1
|
63
|
-
- 9
|
57
|
+
- !ruby/object:Gem::Version
|
64
58
|
version: 1.1.9
|
59
|
+
none: false
|
65
60
|
prerelease: false
|
66
|
-
type: :development
|
67
61
|
name: cucumber
|
68
|
-
requirement:
|
69
|
-
|
70
|
-
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ~>
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.1.9
|
71
67
|
none: false
|
72
|
-
|
68
|
+
type: :development
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
73
72
|
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
hash: 25
|
76
|
-
segments:
|
77
|
-
- 0
|
78
|
-
- 4
|
79
|
-
- 11
|
73
|
+
- !ruby/object:Gem::Version
|
80
74
|
version: 0.4.11
|
75
|
+
none: false
|
81
76
|
prerelease: false
|
82
|
-
type: :development
|
83
77
|
name: aruba
|
84
|
-
requirement:
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.4.11
|
83
|
+
none: false
|
84
|
+
type: :development
|
85
85
|
description: rspec expectations (should[_not] and matchers)
|
86
86
|
email: rspec-users@rubyforge.org
|
87
87
|
executables: []
|
88
|
-
|
89
88
|
extensions: []
|
90
|
-
|
91
89
|
extra_rdoc_files: []
|
92
|
-
|
93
|
-
files:
|
90
|
+
files:
|
94
91
|
- lib/rspec-expectations.rb
|
95
92
|
- lib/rspec/expectations.rb
|
96
93
|
- lib/rspec/expectations/deprecation.rb
|
@@ -200,6 +197,7 @@ files:
|
|
200
197
|
- spec/rspec/matchers/exist_spec.rb
|
201
198
|
- spec/rspec/matchers/has_spec.rb
|
202
199
|
- spec/rspec/matchers/have_spec.rb
|
200
|
+
- spec/rspec/matchers/include_matcher_integration_spec.rb
|
203
201
|
- spec/rspec/matchers/include_spec.rb
|
204
202
|
- spec/rspec/matchers/match_array_spec.rb
|
205
203
|
- spec/rspec/matchers/match_spec.rb
|
@@ -220,39 +218,38 @@ files:
|
|
220
218
|
- spec/support/ruby_version.rb
|
221
219
|
- spec/support/shared_examples.rb
|
222
220
|
homepage: http://github.com/rspec/rspec-expectations
|
223
|
-
licenses:
|
221
|
+
licenses:
|
224
222
|
- MIT
|
225
223
|
post_install_message:
|
226
|
-
rdoc_options:
|
224
|
+
rdoc_options:
|
227
225
|
- --charset=UTF-8
|
228
|
-
require_paths:
|
226
|
+
require_paths:
|
229
227
|
- lib
|
230
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
segments:
|
228
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
229
|
+
requirements:
|
230
|
+
- - ! '>='
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: '0'
|
233
|
+
segments:
|
237
234
|
- 0
|
238
|
-
|
239
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
235
|
+
hash: 3249637945894736858
|
240
236
|
none: false
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
237
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
|
+
requirements:
|
239
|
+
- - ! '>='
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: '0'
|
242
|
+
segments:
|
246
243
|
- 0
|
247
|
-
|
244
|
+
hash: 3249637945894736858
|
245
|
+
none: false
|
248
246
|
requirements: []
|
249
|
-
|
250
247
|
rubyforge_project: rspec
|
251
248
|
rubygems_version: 1.8.24
|
252
249
|
signing_key:
|
253
250
|
specification_version: 3
|
254
|
-
summary: rspec-expectations-2.
|
255
|
-
test_files:
|
251
|
+
summary: rspec-expectations-2.13.0
|
252
|
+
test_files:
|
256
253
|
- features/README.md
|
257
254
|
- features/Upgrade.md
|
258
255
|
- features/built_in_matchers/README.md
|
@@ -310,6 +307,7 @@ test_files:
|
|
310
307
|
- spec/rspec/matchers/exist_spec.rb
|
311
308
|
- spec/rspec/matchers/has_spec.rb
|
312
309
|
- spec/rspec/matchers/have_spec.rb
|
310
|
+
- spec/rspec/matchers/include_matcher_integration_spec.rb
|
313
311
|
- spec/rspec/matchers/include_spec.rb
|
314
312
|
- spec/rspec/matchers/match_array_spec.rb
|
315
313
|
- spec/rspec/matchers/match_spec.rb
|