rspec-expectations 2.0.0.beta.19 → 2.0.0.beta.20

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.
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "should satisfy { block }" do
4
- it "should pass if block returns true" do
4
+ it "passes if block returns true" do
5
5
  true.should satisfy { |val| val }
6
6
  true.should satisfy do |val|
7
7
  val
8
8
  end
9
9
  end
10
10
 
11
- it "should fail if block returns false" do
11
+ it "fails if block returns false" do
12
12
  lambda {
13
13
  false.should satisfy { |val| val }
14
14
  }.should fail_with("expected false to satisfy block")
@@ -21,14 +21,14 @@ describe "should satisfy { block }" do
21
21
  end
22
22
 
23
23
  describe "should_not satisfy { block }" do
24
- it "should pass if block returns false" do
24
+ it "passes if block returns false" do
25
25
  false.should_not satisfy { |val| val }
26
26
  false.should_not satisfy do |val|
27
27
  val
28
28
  end
29
29
  end
30
30
 
31
- it "should fail if block returns true" do
31
+ it "fails if block returns true" do
32
32
  lambda {
33
33
  true.should_not satisfy { |val| val }
34
34
  }.should fail_with("expected true not to satisfy block")
@@ -4,90 +4,90 @@ module RSpec
4
4
  module Matchers
5
5
  describe ThrowSymbol do
6
6
  describe "with no args" do
7
- before(:each) { @matcher = ThrowSymbol.new }
7
+ before(:each) { @matcher = throw_symbol }
8
8
 
9
- it "should match if any Symbol is thrown" do
9
+ it "matches if any Symbol is thrown" do
10
10
  @matcher.matches?(lambda{ throw :sym }).should be_true
11
11
  end
12
- it "should match if any Symbol is thrown with an arg" do
12
+ it "matches if any Symbol is thrown with an arg" do
13
13
  @matcher.matches?(lambda{ throw :sym, "argument" }).should be_true
14
14
  end
15
- it "should not match if no Symbol is thrown" do
15
+ it "does not match if no Symbol is thrown" do
16
16
  @matcher.matches?(lambda{ }).should be_false
17
17
  end
18
- it "should provide a failure message" do
18
+ it "provides a failure message" do
19
19
  @matcher.matches?(lambda{})
20
20
  @matcher.failure_message_for_should.should == "expected a Symbol but nothing was thrown"
21
21
  end
22
- it "should provide a negative failure message" do
22
+ it "provides a negative failure message" do
23
23
  @matcher.matches?(lambda{ throw :sym})
24
24
  @matcher.failure_message_for_should_not.should == "expected no Symbol, got :sym"
25
25
  end
26
26
  end
27
27
 
28
28
  describe "with a symbol" do
29
- before(:each) { @matcher = ThrowSymbol.new(:sym) }
29
+ before(:each) { @matcher = throw_symbol(:sym) }
30
30
 
31
- it "should match if correct Symbol is thrown" do
31
+ it "matches if correct Symbol is thrown" do
32
32
  @matcher.matches?(lambda{ throw :sym }).should be_true
33
33
  end
34
- it "should match if correct Symbol is thrown with an arg" do
34
+ it "matches if correct Symbol is thrown with an arg" do
35
35
  @matcher.matches?(lambda{ throw :sym, "argument" }).should be_true
36
36
  end
37
- it "should not match if no Symbol is thrown" do
37
+ it "does not match if no Symbol is thrown" do
38
38
  @matcher.matches?(lambda{ }).should be_false
39
39
  end
40
- it "should not match if correct Symbol is thrown" do
40
+ it "does not match if correct Symbol is thrown" do
41
41
  @matcher.matches?(lambda{ throw :other_sym }).should be_false
42
42
  end
43
- it "should provide a failure message when no Symbol is thrown" do
43
+ it "provides a failure message when no Symbol is thrown" do
44
44
  @matcher.matches?(lambda{})
45
45
  @matcher.failure_message_for_should.should == "expected :sym but nothing was thrown"
46
46
  end
47
- it "should provide a failure message when wrong Symbol is thrown" do
47
+ it "provides a failure message when wrong Symbol is thrown" do
48
48
  @matcher.matches?(lambda{ throw :other_sym })
49
49
  @matcher.failure_message_for_should.should == "expected :sym, got :other_sym"
50
50
  end
51
- it "should provide a negative failure message" do
51
+ it "provides a negative failure message" do
52
52
  @matcher.matches?(lambda{ throw :sym })
53
53
  @matcher.failure_message_for_should_not.should == "expected :sym not to be thrown"
54
54
  end
55
- it "should only match NameErrors raised by uncaught throws" do
55
+ it "only matches NameErrors raised by uncaught throws" do
56
56
  @matcher.matches?(lambda{ sym }).should be_false
57
57
  end
58
58
  end
59
59
 
60
60
  describe "with a symbol and an arg" do
61
- before(:each) { @matcher = ThrowSymbol.new(:sym, "a") }
61
+ before(:each) { @matcher = throw_symbol(:sym, "a") }
62
62
 
63
- it "should match if correct Symbol and args are thrown" do
63
+ it "matches if correct Symbol and args are thrown" do
64
64
  @matcher.matches?(lambda{ throw :sym, "a" }).should be_true
65
65
  end
66
- it "should not match if nothing is thrown" do
66
+ it "does not match if nothing is thrown" do
67
67
  @matcher.matches?(lambda{ }).should be_false
68
68
  end
69
- it "should not match if other Symbol is thrown" do
69
+ it "does not match if other Symbol is thrown" do
70
70
  @matcher.matches?(lambda{ throw :other_sym, "a" }).should be_false
71
71
  end
72
- it "should not match if no arg is thrown" do
72
+ it "does not match if no arg is thrown" do
73
73
  @matcher.matches?(lambda{ throw :sym }).should be_false
74
74
  end
75
- it "should not match if wrong arg is thrown" do
75
+ it "does not match if wrong arg is thrown" do
76
76
  @matcher.matches?(lambda{ throw :sym, "b" }).should be_false
77
77
  end
78
- it "should provide a failure message when no Symbol is thrown" do
78
+ it "provides a failure message when no Symbol is thrown" do
79
79
  @matcher.matches?(lambda{})
80
80
  @matcher.failure_message_for_should.should == %q[expected :sym with "a" but nothing was thrown]
81
81
  end
82
- it "should provide a failure message when wrong Symbol is thrown" do
82
+ it "provides a failure message when wrong Symbol is thrown" do
83
83
  @matcher.matches?(lambda{ throw :other_sym })
84
84
  @matcher.failure_message_for_should.should == %q[expected :sym with "a", got :other_sym]
85
85
  end
86
- it "should provide a negative failure message" do
86
+ it "provides a negative failure message" do
87
87
  @matcher.matches?(lambda{ throw :sym })
88
88
  @matcher.failure_message_for_should_not.should == %q[expected :sym with "a" not to be thrown]
89
89
  end
90
- it "should only match NameErrors raised by uncaught throws" do
90
+ it "only matches NameErrors raised by uncaught throws" do
91
91
  @matcher.matches?(lambda{ sym }).should be_false
92
92
  end
93
93
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196421
5
4
  prerelease: true
6
5
  segments:
7
6
  - 2
8
7
  - 0
9
8
  - 0
10
9
  - beta
11
- - 19
12
- version: 2.0.0.beta.19
10
+ - 20
11
+ version: 2.0.0.beta.20
13
12
  platform: ruby
14
13
  authors:
15
14
  - David Chelimsky
@@ -18,93 +17,88 @@ autorequire:
18
17
  bindir: bin
19
18
  cert_chain: []
20
19
 
21
- date: 2010-07-25 00:00:00 -05:00
20
+ date: 2010-08-24 00:00:00 -05:00
22
21
  default_executable:
23
22
  dependencies:
24
23
  - !ruby/object:Gem::Dependency
25
- type: :runtime
26
- prerelease: false
27
24
  name: diff-lcs
28
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ requirement: &id001 !ruby/object:Gem::Requirement
29
26
  none: false
30
27
  requirements:
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
- hash: 23
34
30
  segments:
35
31
  - 1
36
32
  - 1
37
33
  - 2
38
34
  version: 1.1.2
39
- requirement: *id001
40
- - !ruby/object:Gem::Dependency
41
- type: :development
35
+ type: :runtime
42
36
  prerelease: false
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
43
39
  name: cucumber
44
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ requirement: &id002 !ruby/object:Gem::Requirement
45
41
  none: false
46
42
  requirements:
47
43
  - - ">="
48
44
  - !ruby/object:Gem::Version
49
- hash: 3
50
45
  segments:
51
46
  - 0
52
47
  - 6
53
48
  - 2
54
49
  version: 0.6.2
55
- requirement: *id002
56
- - !ruby/object:Gem::Dependency
57
50
  type: :development
58
51
  prerelease: false
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
59
54
  name: aruba
60
- version_requirements: &id003 !ruby/object:Gem::Requirement
55
+ requirement: &id003 !ruby/object:Gem::Requirement
61
56
  none: false
62
57
  requirements:
63
58
  - - ">="
64
59
  - !ruby/object:Gem::Version
65
- hash: 25
66
60
  segments:
67
61
  - 0
68
62
  - 1
69
63
  - 1
70
64
  version: 0.1.1
71
- requirement: *id003
72
- - !ruby/object:Gem::Dependency
73
65
  type: :development
74
66
  prerelease: false
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
75
69
  name: rspec-core
76
- version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ requirement: &id004 !ruby/object:Gem::Requirement
77
71
  none: false
78
72
  requirements:
79
73
  - - ">="
80
74
  - !ruby/object:Gem::Version
81
- hash: 62196421
82
75
  segments:
83
76
  - 2
84
77
  - 0
85
78
  - 0
86
79
  - beta
87
- - 19
88
- version: 2.0.0.beta.19
89
- requirement: *id004
90
- - !ruby/object:Gem::Dependency
80
+ - 20
81
+ version: 2.0.0.beta.20
91
82
  type: :development
92
83
  prerelease: false
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
93
86
  name: rspec-mocks
94
- version_requirements: &id005 !ruby/object:Gem::Requirement
87
+ requirement: &id005 !ruby/object:Gem::Requirement
95
88
  none: false
96
89
  requirements:
97
90
  - - ">="
98
91
  - !ruby/object:Gem::Version
99
- hash: 62196421
100
92
  segments:
101
93
  - 2
102
94
  - 0
103
95
  - 0
104
96
  - beta
105
- - 19
106
- version: 2.0.0.beta.19
107
- requirement: *id005
97
+ - 20
98
+ version: 2.0.0.beta.20
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *id005
108
102
  description: rspec expectations (should[_not] and matchers)
109
103
  email: dchelimsky@gmail.com;chad.humphries@gmail.com
110
104
  executables: []
@@ -141,6 +135,7 @@ files:
141
135
  - lib/rspec/expectations/differ.rb
142
136
  - lib/rspec/expectations/errors.rb
143
137
  - lib/rspec/expectations/extensions.rb
138
+ - lib/rspec/expectations/extensions/array.rb
144
139
  - lib/rspec/expectations/extensions/kernel.rb
145
140
  - lib/rspec/expectations/extensions/rspec/core/example_group.rb
146
141
  - lib/rspec/expectations/fail_with.rb
@@ -211,13 +206,7 @@ has_rdoc: true
211
206
  homepage: http://github.com/rspec/expectations
212
207
  licenses: []
213
208
 
214
- post_install_message: |
215
- **************************************************
216
-
217
- Thank you for installing rspec-expectations-2.0.0.beta.19
218
-
219
- **************************************************
220
-
209
+ post_install_message:
221
210
  rdoc_options:
222
211
  - --charset=UTF-8
223
212
  require_paths:
@@ -227,7 +216,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
216
  requirements:
228
217
  - - ">="
229
218
  - !ruby/object:Gem::Version
230
- hash: 3
219
+ hash: 1873764250961568467
231
220
  segments:
232
221
  - 0
233
222
  version: "0"
@@ -236,7 +225,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
225
  requirements:
237
226
  - - ">"
238
227
  - !ruby/object:Gem::Version
239
- hash: 25
240
228
  segments:
241
229
  - 1
242
230
  - 3
@@ -248,7 +236,7 @@ rubyforge_project: rspec
248
236
  rubygems_version: 1.3.7
249
237
  signing_key:
250
238
  specification_version: 3
251
- summary: rspec-expectations-2.0.0.beta.19
239
+ summary: rspec-expectations-2.0.0.beta.20
252
240
  test_files:
253
241
  - spec/rspec/expectations/differ_spec.rb
254
242
  - spec/rspec/expectations/extensions/kernel_spec.rb