rspec_multi_matchers 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/match_each.rb +2 -2
  2. metadata +27 -12
@@ -23,9 +23,9 @@ class MatchEach
23
23
  end
24
24
 
25
25
  @counter = 0
26
- target.each do |obj|
26
+ target.each_with_index do |obj, i|
27
27
  begin
28
- @block.call(obj)
28
+ @block.call(obj, i)
29
29
  rescue Spec::Expectations::ExpectationNotMetError => e
30
30
  @error = e
31
31
  @failure_object = obj
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_multi_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 3
9
+ version: 1.0.3
5
10
  platform: ruby
6
11
  authors:
7
12
  - Greg Weber
@@ -14,24 +19,32 @@ default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: newgem
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 1
30
+ - 0
23
31
  version: 1.1.0
24
- version:
32
+ type: :development
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: hoe
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 8
44
+ - 0
33
45
  version: 1.8.0
34
- version:
46
+ type: :development
47
+ version_requirements: *id002
35
48
  description: "* match_each * match_enum * match_in_order require 'rubygems' require 'spec' require 'gregwebs-rspec_multi_matchers' describe 'array of ones' do it 'should be all ones' do [1,2,3].should each { |n| n.should == 1 } end end =begin output 'array of ones should fail on 2' FAILED line: 14 item 1: 2 expected: 1, got: 2 (using ==) =end As expected, the output shows expected and got fields line is the line number of the expectiation inside the block the item line gives the index of the item being yielded to the block, and the item itself"
36
49
  email:
37
50
  - ""
@@ -76,18 +89,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
89
  requirements:
77
90
  - - ">="
78
91
  - !ruby/object:Gem::Version
92
+ segments:
93
+ - 0
79
94
  version: "0"
80
- version:
81
95
  required_rubygems_version: !ruby/object:Gem::Requirement
82
96
  requirements:
83
97
  - - ">="
84
98
  - !ruby/object:Gem::Version
99
+ segments:
100
+ - 0
85
101
  version: "0"
86
- version:
87
102
  requirements: []
88
103
 
89
104
  rubyforge_project: rspec_multi_matchers
90
- rubygems_version: 1.3.5
105
+ rubygems_version: 1.3.6
91
106
  signing_key:
92
107
  specification_version: 2
93
108
  summary: "* match_each * match_enum * match_in_order require 'rubygems' require 'spec' require 'gregwebs-rspec_multi_matchers' describe 'array of ones' do it 'should be all ones' do [1,2,3].should each { |n| n.should == 1 } end end =begin output 'array of ones should fail on 2' FAILED line: 14 item 1: 2 expected: 1, got: 2 (using ==) =end As expected, the output shows expected and got fields line is the line number of the expectiation inside the block the item line gives the index of the item being yielded to the block, and the item itself"