rspec-steps 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MmRjMzBjYzJhZjg1M2Q3OTJiMWNjZTk1ZTk1ZGZmZGFmZTAyOGRiNQ==
5
- data.tar.gz: !binary |-
6
- ZTU5OTM2Y2M0MDI5YmMyOWZiMDM0NzY3NTEyNTNhNWI5NDlhOGMyMA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- N2M0ODJiYzE4ZDdjNmE4MjcwMTNmNDU5MGE4MTZjODE0MWRhYTIwYmI5MjI4
10
- ZjU3ZGU3NjZhZmQ0NTdiZjQyMWIyYmViMjg5ZDA1NWE4NTk0NWJjZmI2NDJh
11
- YjQ2MDRiMjNkODlmMDk1OTMzZjQyZWU2MzQzMDY3YjczMjViOGQ=
12
- data.tar.gz: !binary |-
13
- OWU3MmZmNzAxZjQyOWQ5OWJhOTY1MzI1NTNjMzJhZmI5NjAyY2Q0NTk3NjJk
14
- NmM0YzMyNTUxMWQwMmU3ZDNiMDg0ZGFhZjQxMzE4NDdmN2U1NTdhNzg2Y2U5
15
- OWM0MzZlMzFkY2U5YTMzZDc1MjllMmI3M2U1YjVhNDMzMDFlM2Q=
2
+ SHA1:
3
+ metadata.gz: 8cdf772b6fb5174e066ce35852f18f6ec16174ab
4
+ data.tar.gz: 9839992f03ddf0ffc9cfebc25197b88dd997db64
5
+ SHA512:
6
+ metadata.gz: 26c6a66a35b61929ca1f84b040c21bff492105d809caed7bf2c99cdb5553bbd540200f627b28c5241a008dcafd6606f3660e599af075432a278228885d1dd7c9
7
+ data.tar.gz: b9af7e4aa00dec6a79efb16571db9197b0ed24a0f4f55f5ee3ed4aaa13f4e64fac0079466161b2e56afe264a003586d48c64b6d889f157704205323c0ba19a3d
@@ -161,7 +161,12 @@ module RSpecStepwise
161
161
  end
162
162
 
163
163
  def perform_steps(name, *args, &customization_block)
164
- shared_block = world.shared_example_groups[name]
164
+ shared_block = nil
165
+ if world.respond_to? :shared_example_groups
166
+ shared_block = world.shared_example_groups[name]
167
+ else
168
+ shared_block = shared_example_groups[name]
169
+ end
165
170
  raise "Could not find shared example group named #{name.inspect}" unless shared_block
166
171
 
167
172
  module_eval_with_args(*args, &shared_block)
@@ -29,6 +29,27 @@ describe RSpec::Core::ExampleGroup, "defined as stepwise" do
29
29
  end
30
30
  end
31
31
 
32
+ it "should work with shared_steps/perform steps" do
33
+ group = nil
34
+ sandboxed do
35
+ group = steps "Test Steps" do
36
+ shared_steps "add one" do
37
+ it("adds one to @a"){ @a += 1 }
38
+ end
39
+ it("sets @a"){ @a = 1 }
40
+ perform_steps "add one"
41
+ perform_steps "add one"
42
+ perform_steps "add one"
43
+ it("reads @a"){ @a.should == 4 }
44
+ end
45
+ group.run
46
+ end
47
+
48
+ group.examples.each do |example|
49
+ example.metadata[:execution_result][:status].should == 'passed'
50
+ end
51
+ end
52
+
32
53
  it "should run each_step hooks" do
33
54
  group = nil
34
55
  afters = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
@@ -9,27 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-29 00:00:00.000000000 Z
12
+ date: 2014-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: corundum
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.0.25
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.0.25
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '2.6'
35
35
  - - <
@@ -39,16 +39,17 @@ dependencies:
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - ! '>='
42
+ - - '>='
43
43
  - !ruby/object:Gem::Version
44
44
  version: '2.6'
45
45
  - - <
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.99'
48
- description: ! " I don't like Cucumber. I don't need plain text stories. My clients
49
- either\n read code or don't read any test documents, so Cucumber is mostly useless
50
- to me.\n But often, especially in full integration tests, it would be nice to have\n
51
- \ steps in a test.\n"
48
+ description: |2
49
+ I don't like Cucumber. I don't need plain text stories. My clients either
50
+ read code or don't read any test documents, so Cucumber is mostly useless to me.
51
+ But often, especially in full integration tests, it would be nice to have
52
+ steps in a test.
52
53
  email:
53
54
  - judson@lrdesign.com
54
55
  - evan@lrdesign.com
@@ -314,17 +315,17 @@ rdoc_options:
314
315
  - --main
315
316
  - doc/README
316
317
  - --title
317
- - rspec-steps-0.3.0 RDoc
318
+ - rspec-steps-0.4.0 RDoc
318
319
  require_paths:
319
320
  - lib/
320
321
  required_ruby_version: !ruby/object:Gem::Requirement
321
322
  requirements:
322
- - - ! '>='
323
+ - - '>='
323
324
  - !ruby/object:Gem::Version
324
325
  version: '0'
325
326
  required_rubygems_version: !ruby/object:Gem::Requirement
326
327
  requirements:
327
- - - ! '>='
328
+ - - '>='
328
329
  - !ruby/object:Gem::Version
329
330
  version: '0'
330
331
  requirements: []