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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eab60c3e50e50e286389f43541fd90f062a542d8
4
- data.tar.gz: 73e5c1296f3f1a723ac1f87cbe8eb3d338903ec1
3
+ metadata.gz: d872a7809f8688b6230b2a8ac6b7cca50622a978
4
+ data.tar.gz: a88c87f059ad11d074cbe40b16f1ae510ff4bbf9
5
5
  SHA512:
6
- metadata.gz: deb2cf0765a9ab14901f1752b86e055d710d68962e4c3c33efcad4a957a1cf8f03552e4148220cd7843e9518a4a4ce1dbd5c5d4184cc7447b987e8867eb1b624
7
- data.tar.gz: 361f0d782298dcf2b23e651f20ddb9e27c235127320fdfd29d0e097834381bfea22a52df9ccaaba8b4e082d49c2b984b59f77e7dcc80dbec5b1240970fe344d4
6
+ metadata.gz: 88d676b267090b08f04808a4dff5c0568cee871bac4f90b7f4df13c24262a217faccd6384d00abf713b241f0c440bf554229152d28ae45a11233b702e902673c
7
+ data.tar.gz: 029f199720799adea25e22848b5ae7dceea5774cf428ade72ef85d2b6bbf2a54466ee52e57d4e5891258f15e4a229d9ec2f12dc9e78b1036358825c7fcaa7f16
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake'
4
- gem 'rspec', '>= 2.12'
4
+ gem 'rspec', ENV['RSPEC_VERSION'] || '>= 2.14.0'
5
5
  gem 'minitest', '>= 4.3'
6
6
  gem 'sorcerer', '>= 0.3.7'
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 (4.3.2)
6
- rake (0.9.6)
7
- rspec (3.0.0.beta2)
8
- rspec-core (= 3.0.0.beta2)
9
- rspec-expectations (= 3.0.0.beta2)
10
- rspec-mocks (= 3.0.0.beta2)
11
- rspec-core (3.0.0.beta2)
12
- rspec-support (= 3.0.0.beta2)
13
- rspec-expectations (3.0.0.beta2)
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 (= 3.0.0.beta2)
16
- rspec-mocks (3.0.0.beta2)
17
- rspec-support (= 3.0.0.beta2)
18
- rspec-support (3.0.0.beta2)
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.12)
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/jimweirich/rspec-given.png?branch=master)](https://travis-ci.org/jimweirich/rspec-given) |
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.5.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.12 or better.
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/jimweirich/rspec-given/blob/minispec/examples/stack/stack_spec.rb)
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/jimweirich/rspec-given/blob/minispec/examples/example_helper.rb)
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/jimweirich/rspec-given](https://github.com/jimweirich/rspec-given)
952
- * Clone URL: git://github.com/jimweirich/rspec-given.git
953
- * Bug/Issue Reporting: [https://github.com/jimweirich/rspec-given/issues](https://github.com/jimweirich/rspec-given/issues)
954
- * Continuous Integration: [http://travis-ci.org/#!/jimweirich/rspec-given](http://travis-ci.org/#!/jimweirich/rspec-given)
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/jimweirich/rspec-given
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.12")
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/jimweirich/rspec-given"
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/jimweirich/rspec-given"
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/jimweirich/rspec-given"
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(failure).to raise_error(StandardError, "Oops") }
25
- Then { expect(failure).to raise_error(StandardError) }
26
- Then { expect(failure).to raise_error }
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(result).to raise_error(CustomError, "Ouch") }
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(result).to raise_error(StandardError, "Ouch") }
27
- Then { expect(result).to raise_error(StandardError, /^O/) }
28
- Then { expect(result).to raise_error(StandardError) }
29
- Then { expect(result).to raise_error }
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 pending exception" do
43
- def pending_error
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 pending_error, "Required pending in example ... please ignore" }
47
- Then { Given.fail_with "This example should have been pending" }
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.5.4
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: 2014-02-19 00:00:00.000000000 Z
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.5.4
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.5.4
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: '2.12'
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: '2.12'
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/jimweirich/rspec-given
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.2.0
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.