rspec-expectations 2.6.0.rc6 → 2.6.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.
- data/features/Changelog.md +3 -15
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers/cover.rb +8 -8
- metadata +9 -13
data/features/Changelog.md
CHANGED
@@ -1,23 +1,11 @@
|
|
1
|
-
### 2.6.0
|
1
|
+
### 2.6.0 / 2011-05-12
|
2
2
|
|
3
|
-
[full changelog](http://github.com/rspec/rspec-expectations/compare/v2.
|
4
|
-
|
5
|
-
No changes this release (releasing to align with rc5 of other rspec gems).
|
6
|
-
|
7
|
-
### 2.6.0.rc4 / 2011-05-01
|
8
|
-
|
9
|
-
[full changelog](http://github.com/rspec/rspec-expectations/compare/v2.6.0.rc2...v2.6.0.rc4)
|
10
|
-
|
11
|
-
* Enhancements
|
12
|
-
* range.should cover(*values) (Anders Furseth)
|
13
|
-
|
14
|
-
### 2.6.0.rc2 / 2011-04-18
|
15
|
-
|
16
|
-
[full changelog](http://github.com/rspec/rspec-expectations/compare/v2.5.0...v2.6.0.rc2)
|
3
|
+
[full changelog](http://github.com/rspec/rspec-expectations/compare/v2.5.0...v2.6.0)
|
17
4
|
|
18
5
|
* Enhancments
|
19
6
|
* `change` matcher accepts Regexps (Robert Davis)
|
20
7
|
* better descriptions for have_xxx matchers (Magnus Bergmark)
|
8
|
+
* range.should cover(*values) (Anders Furseth)
|
21
9
|
|
22
10
|
* Bug fixes
|
23
11
|
* Removed non-ascii characters that were choking rcov (Geoffrey Byers)
|
data/lib/rspec/matchers/cover.rb
CHANGED
@@ -16,18 +16,18 @@ module RSpec
|
|
16
16
|
# (1..10).should_not cover(5) # will fail
|
17
17
|
#
|
18
18
|
# == Warning: Ruby >= 1.9 only
|
19
|
-
def cover(*
|
20
|
-
Matcher.new :cover, *
|
21
|
-
match_for_should do |
|
22
|
-
|
19
|
+
def cover(*values)
|
20
|
+
Matcher.new :cover, *values do |*_values|
|
21
|
+
match_for_should do |range|
|
22
|
+
_values.all? &covered_by(range)
|
23
23
|
end
|
24
24
|
|
25
|
-
match_for_should_not do |
|
26
|
-
|
25
|
+
match_for_should_not do |range|
|
26
|
+
_values.none? &covered_by(range)
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
30
|
-
lambda {|value|
|
29
|
+
def covered_by(range)
|
30
|
+
lambda {|value| range.cover?(value)}
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-expectations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 6
|
9
9
|
- 0
|
10
|
-
|
11
|
-
- 6
|
12
|
-
version: 2.6.0.rc6
|
10
|
+
version: 2.6.0
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- David Chelimsky
|
@@ -18,7 +16,7 @@ autorequire:
|
|
18
16
|
bindir: bin
|
19
17
|
cert_chain: []
|
20
18
|
|
21
|
-
date: 2011-05-
|
19
|
+
date: 2011-05-12 00:00:00 -05:00
|
22
20
|
default_executable:
|
23
21
|
dependencies:
|
24
22
|
- !ruby/object:Gem::Dependency
|
@@ -188,21 +186,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
187
|
none: false
|
190
188
|
requirements:
|
191
|
-
- - "
|
189
|
+
- - ">="
|
192
190
|
- !ruby/object:Gem::Version
|
193
|
-
hash:
|
191
|
+
hash: 3
|
194
192
|
segments:
|
195
|
-
-
|
196
|
-
|
197
|
-
- 1
|
198
|
-
version: 1.3.1
|
193
|
+
- 0
|
194
|
+
version: "0"
|
199
195
|
requirements: []
|
200
196
|
|
201
197
|
rubyforge_project: rspec
|
202
198
|
rubygems_version: 1.6.2
|
203
199
|
signing_key:
|
204
200
|
specification_version: 3
|
205
|
-
summary: rspec-expectations-2.6.0
|
201
|
+
summary: rspec-expectations-2.6.0
|
206
202
|
test_files:
|
207
203
|
- features/Changelog.md
|
208
204
|
- features/README.markdown
|