rspec-given 3.5.4 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +14 -14
- data/README.md +13 -9
- data/doc/main.rdoc +1 -1
- data/rakelib/gemspec.rake +4 -4
- data/spec/lib/given/failure_spec.rb +3 -3
- data/spec/lib/given/have_failed_spec.rb +16 -9
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d872a7809f8688b6230b2a8ac6b7cca50622a978
|
4
|
+
data.tar.gz: a88c87f059ad11d074cbe40b16f1ae510ff4bbf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d676b267090b08f04808a4dff5c0568cee871bac4f90b7f4df13c24262a217faccd6384d00abf713b241f0c440bf554229152d28ae45a11233b702e902673c
|
7
|
+
data.tar.gz: 029f199720799adea25e22848b5ae7dceea5774cf428ade72ef85d2b6bbf2a54466ee52e57d4e5891258f15e4a229d9ec2f12dc9e78b1036358825c7fcaa7f16
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,20 +2,20 @@ GEM
|
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
4
|
diff-lcs (1.2.5)
|
5
|
-
minitest (
|
6
|
-
rake (
|
7
|
-
rspec (3.
|
8
|
-
rspec-core (
|
9
|
-
rspec-expectations (
|
10
|
-
rspec-mocks (
|
11
|
-
rspec-core (3.
|
12
|
-
rspec-support (
|
13
|
-
rspec-expectations (3.
|
5
|
+
minitest (5.5.0)
|
6
|
+
rake (10.4.2)
|
7
|
+
rspec (3.1.0)
|
8
|
+
rspec-core (~> 3.1.0)
|
9
|
+
rspec-expectations (~> 3.1.0)
|
10
|
+
rspec-mocks (~> 3.1.0)
|
11
|
+
rspec-core (3.1.7)
|
12
|
+
rspec-support (~> 3.1.0)
|
13
|
+
rspec-expectations (3.1.2)
|
14
14
|
diff-lcs (>= 1.2.0, < 2.0)
|
15
|
-
rspec-support (
|
16
|
-
rspec-mocks (3.
|
17
|
-
rspec-support (
|
18
|
-
rspec-support (3.
|
15
|
+
rspec-support (~> 3.1.0)
|
16
|
+
rspec-mocks (3.1.3)
|
17
|
+
rspec-support (~> 3.1.0)
|
18
|
+
rspec-support (3.1.2)
|
19
19
|
sorcerer (1.0.2)
|
20
20
|
|
21
21
|
PLATFORMS
|
@@ -25,5 +25,5 @@ PLATFORMS
|
|
25
25
|
DEPENDENCIES
|
26
26
|
minitest (>= 4.3)
|
27
27
|
rake
|
28
|
-
rspec (>= 2.
|
28
|
+
rspec (>= 2.14.0)
|
29
29
|
sorcerer (>= 0.3.7)
|
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
| Master |
|
4
4
|
| :----: |
|
5
|
-
| [![Master Build Status](https://secure.travis-ci.org/
|
5
|
+
| [![Master Build Status](https://secure.travis-ci.org/rspec-given/rspec-given.png?branch=master)](https://travis-ci.org/rspec-given/rspec-given) |
|
6
6
|
|
7
|
-
Covering rspec-given, minitest-given, and given-core, version 3.
|
7
|
+
Covering rspec-given, minitest-given, and given-core, version 3.6.0.
|
8
8
|
|
9
9
|
rspec-given and minitest-given are extensions to your favorite testing
|
10
10
|
framework to allow Given/When/Then notation when writing specs.
|
@@ -27,7 +27,7 @@ The rspec-given gem is the original given/when/then extension for
|
|
27
27
|
RSpec. It now depends on a given_core gem for the basic functionality
|
28
28
|
and then adds the RSpec specific code.
|
29
29
|
|
30
|
-
* rspec-given now requires RSpec version 2.
|
30
|
+
* rspec-given now requires RSpec version 2.14.0 or better.
|
31
31
|
|
32
32
|
### Minitest/Given
|
33
33
|
|
@@ -72,9 +72,9 @@ end
|
|
72
72
|
```
|
73
73
|
|
74
74
|
See
|
75
|
-
[stack_spec.rb](https://github.com/
|
75
|
+
[stack_spec.rb](https://github.com/rspec-given/rspec-given/blob/minispec/examples/stack/stack_spec.rb)
|
76
76
|
and
|
77
|
-
[example_helper.rb](https://github.com/
|
77
|
+
[example_helper.rb](https://github.com/rspec-given/rspec-given/blob/minispec/examples/example_helper.rb)
|
78
78
|
|
79
79
|
## Installation
|
80
80
|
|
@@ -870,6 +870,10 @@ License. See the MIT-LICENSE file in the source distribution.
|
|
870
870
|
|
871
871
|
# History
|
872
872
|
|
873
|
+
* Version 3.6.0
|
874
|
+
|
875
|
+
* Various fixes for RSpec 3.0 (See [#1](https://github.com/rspec-given/rspec-given/pull/1))
|
876
|
+
|
873
877
|
* Version 3.5.4
|
874
878
|
|
875
879
|
* Accommodate the name change on RSpec's Pending exception.
|
@@ -948,7 +952,7 @@ License. See the MIT-LICENSE file in the source distribution.
|
|
948
952
|
|
949
953
|
# Links
|
950
954
|
|
951
|
-
* Github: [https://github.com/
|
952
|
-
* Clone URL: git://github.com/
|
953
|
-
* Bug/Issue Reporting: [https://github.com/
|
954
|
-
* Continuous Integration: [http://travis-ci.org/#!/
|
955
|
+
* Github: [https://github.com/rspec-given/rspec-given](https://github.com/rspec-given/rspec-given)
|
956
|
+
* Clone URL: git://github.com/rspec-given/rspec-given.git
|
957
|
+
* Bug/Issue Reporting: [https://github.com/rspec-given/rspec-given/issues](https://github.com/rspec-given/rspec-given/issues)
|
958
|
+
* Continuous Integration: [http://travis-ci.org/#!/rspec-given/rspec-given](http://travis-ci.org/#!/rspec-given/rspec-given)
|
data/doc/main.rdoc
CHANGED
@@ -4,4 +4,4 @@ rspec-given is an RSpec extension to allow Given/When/Then notation in
|
|
4
4
|
RSpec specifications. It is a natural extension of the experimental
|
5
5
|
work done on the Given framework.
|
6
6
|
|
7
|
-
For more information see http://github.com/
|
7
|
+
For more information see http://github.com/rspec-given/rspec-given
|
data/rakelib/gemspec.rake
CHANGED
@@ -48,14 +48,14 @@ EOF
|
|
48
48
|
]
|
49
49
|
|
50
50
|
s.add_dependency("given_core", "= #{Given::VERSION}")
|
51
|
-
s.add_dependency("rspec", ">= 2.
|
51
|
+
s.add_dependency("rspec", ">= 2.14.0")
|
52
52
|
|
53
53
|
s.required_ruby_version = '>= 1.9.2'
|
54
54
|
s.license = "MIT"
|
55
55
|
|
56
56
|
s.author = "Jim Weirich"
|
57
57
|
s.email = "jim.weirich@gmail.com"
|
58
|
-
s.homepage = "http://github.com/
|
58
|
+
s.homepage = "http://github.com/rspec-given/rspec-given"
|
59
59
|
s.rubyforge_project = "given"
|
60
60
|
end
|
61
61
|
|
@@ -83,7 +83,7 @@ EOF
|
|
83
83
|
|
84
84
|
s.author = "Jim Weirich"
|
85
85
|
s.email = "jim.weirich@gmail.com"
|
86
|
-
s.homepage = "http://github.com/
|
86
|
+
s.homepage = "http://github.com/rspec-given/rspec-given"
|
87
87
|
s.rubyforge_project = "given"
|
88
88
|
end
|
89
89
|
|
@@ -111,7 +111,7 @@ EOF
|
|
111
111
|
|
112
112
|
s.author = "Jim Weirich"
|
113
113
|
s.email = "jim.weirich@gmail.com"
|
114
|
-
s.homepage = "http://github.com/
|
114
|
+
s.homepage = "http://github.com/rspec-given/rspec-given"
|
115
115
|
s.rubyforge_project = "given"
|
116
116
|
end
|
117
117
|
|
@@ -21,9 +21,9 @@ describe Given::Failure do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "raising error" do
|
24
|
-
Then { expect
|
25
|
-
Then { expect
|
26
|
-
Then { expect
|
24
|
+
Then { expect { failure.call }.to raise_error(StandardError, "Oops") }
|
25
|
+
Then { expect { failure.call }.to raise_error(StandardError) }
|
26
|
+
Then { expect { failure.call }.to raise_error }
|
27
27
|
end
|
28
28
|
|
29
29
|
describe "== have_failed" do
|
@@ -9,7 +9,7 @@ module HaveFailedSpec
|
|
9
9
|
context "with a failure" do
|
10
10
|
When(:result) { fail CustomError, "Ouch" }
|
11
11
|
|
12
|
-
Then { expect
|
12
|
+
Then { expect { result.call }.to raise_error(CustomError, "Ouch") }
|
13
13
|
Then { expect(result).to have_failed(CustomError, "Ouch") }
|
14
14
|
Then { expect(result).to have_raised(CustomError, "Ouch") }
|
15
15
|
|
@@ -23,10 +23,10 @@ module HaveFailedSpec
|
|
23
23
|
context "with a standard failure" do
|
24
24
|
When(:result) { fail "Ouch" }
|
25
25
|
|
26
|
-
Then { expect
|
27
|
-
Then { expect
|
28
|
-
Then { expect
|
29
|
-
Then { expect
|
26
|
+
Then { expect { result.call }.to raise_error(StandardError, "Ouch") }
|
27
|
+
Then { expect { result.call }.to raise_error(StandardError, /^O/) }
|
28
|
+
Then { expect { result.call }.to raise_error(StandardError) }
|
29
|
+
Then { expect { result.call }.to raise_error }
|
30
30
|
|
31
31
|
Then { expect(result).to have_failed(StandardError, "Ouch") }
|
32
32
|
Then { expect(result).to have_failed(StandardError, /^O/) }
|
@@ -39,12 +39,19 @@ module HaveFailedSpec
|
|
39
39
|
Then { expect { expect(result).to have_failed(DifferentError) }.to raise_error(ExpectationError) }
|
40
40
|
end
|
41
41
|
|
42
|
-
context "with a
|
43
|
-
|
42
|
+
context "with a skip exception" do
|
43
|
+
# `skip` replaces old `pending` behavior in RSpec < 3
|
44
|
+
# Details: http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3
|
45
|
+
def skip_error
|
44
46
|
RSpec::Given::Framework.new.pending_error
|
45
47
|
end
|
46
|
-
When(:result) { fail
|
47
|
-
Then { Given.fail_with "This example should have been
|
48
|
+
When(:result) { fail skip_error, "Used `skip` in example ... please ignore" }
|
49
|
+
Then { Given.fail_with "This example should have been skipped" }
|
50
|
+
end
|
51
|
+
|
52
|
+
context "with a pending invocation" do
|
53
|
+
When(:result) { pending "Forcing a pending in example ... please ignore" }
|
54
|
+
Then { Given.fail_with "This example should have been regarded as pending" }
|
48
55
|
end
|
49
56
|
|
50
57
|
context "with a non-failure" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-given
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: given_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.14.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.14.0
|
41
41
|
description: |
|
42
42
|
Given is an RSpec extension that allows the use of Given/When/Then
|
43
43
|
terminology when defining specifications.
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- spec/support/failure_and_errors.rb
|
106
106
|
- spec/support/faux_then.rb
|
107
107
|
- spec/support/natural_assertion_control.rb
|
108
|
-
homepage: http://github.com/
|
108
|
+
homepage: http://github.com/rspec-given/rspec-given
|
109
109
|
licenses:
|
110
110
|
- MIT
|
111
111
|
metadata: {}
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project: given
|
134
|
-
rubygems_version: 2.
|
134
|
+
rubygems_version: 2.4.4
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Given/When/Then Specification Extensions for RSpec.
|