rspec-steps 1.0.4 → 1.0.5
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.
- checksums.yaml +4 -4
- data/lib/rspec-steps/stepwise.rb +5 -7
- data/spec/example_group_spec.rb +6 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ef1322c5db8851d549e88a3d72f31ec148d622
|
4
|
+
data.tar.gz: ca027f3e3b85b24b3b3a5c9efdba5656fa092c71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc146dcc5c0642513c60d68eabb56d621b96fb9b75b6587656b2bad2014f8e1d58250c0984e199ceb7c29253655a9a10ffcb0b7f821d5f2c74f1c9091005eebf
|
7
|
+
data.tar.gz: a7bfd8be5497ffb444b0558495746a6549a37c00f1f407ba6b0f014aa4bbe1ca1039ab41795871cb23de6b47fe7b74e3bd33718b3015eb82532a966a648e5de8
|
data/lib/rspec-steps/stepwise.rb
CHANGED
@@ -31,6 +31,7 @@ module RSpecStepwise
|
|
31
31
|
def build_example_block
|
32
32
|
#variables of concern: reporter, instance
|
33
33
|
reporter = @reporter
|
34
|
+
whole_list = self
|
34
35
|
@example_block = proc do
|
35
36
|
begin
|
36
37
|
self.class.filtered_examples.inject(true) do |success, example|
|
@@ -43,17 +44,14 @@ module RSpecStepwise
|
|
43
44
|
unless success
|
44
45
|
example.metadata[:skip] = "Previous step failed"
|
45
46
|
RSpec::Core::Pending.mark_pending!(example, example.skip)
|
46
|
-
# example.metadata[:pending] = true
|
47
|
-
# exec_result = example.metadata[:execution_result]
|
48
|
-
# if exec_result.respond_to? :pending_message=
|
49
|
-
# exec_result.pending_message = "Previous step failed"
|
50
|
-
# else
|
51
|
-
# exec_result[:pending_message] = "Previous step failed"
|
52
|
-
# end
|
53
47
|
end
|
54
48
|
succeeded = with_indelible_ivars do
|
55
49
|
example.run(self, reporter)
|
56
50
|
end
|
51
|
+
unless example.exception.nil?
|
52
|
+
whole_list.set_exception(example.exception)
|
53
|
+
end
|
54
|
+
|
57
55
|
if self.class.fail_fast? && !succeeded
|
58
56
|
if RSpec.respond_to? :wants_to_quit=
|
59
57
|
RSpec.wants_to_quit = true
|
data/spec/example_group_spec.rb
CHANGED
@@ -105,15 +105,17 @@ describe RSpec::Core::ExampleGroup do
|
|
105
105
|
group = nil
|
106
106
|
exception = Exception.new "Testing Error"
|
107
107
|
|
108
|
+
result = nil
|
108
109
|
sandboxed do
|
109
110
|
group = RSpec.steps "Test Steps" do
|
110
111
|
before { raise exception }
|
111
112
|
it { 1.should == 1 }
|
112
113
|
it { 1.should == 1 }
|
113
114
|
end
|
114
|
-
group.run
|
115
|
+
result = group.run
|
115
116
|
end
|
116
117
|
|
118
|
+
expect(result).to eq(false)
|
117
119
|
group.examples.each do |example|
|
118
120
|
expect(example.metadata[:execution_result].status).to eq(:failed)
|
119
121
|
expect(example.metadata[:execution_result].exception).to eq(exception)
|
@@ -122,14 +124,16 @@ describe RSpec::Core::ExampleGroup do
|
|
122
124
|
|
123
125
|
it "should mark later examples as pending if one fails" do
|
124
126
|
group = nil
|
127
|
+
result = nil
|
125
128
|
sandboxed do
|
126
129
|
group = RSpec.steps "Test Steps" do
|
127
130
|
it { fail "All others fail" }
|
128
131
|
it { 1.should == 1 }
|
129
132
|
end
|
130
|
-
group.run
|
133
|
+
result = group.run
|
131
134
|
end
|
132
135
|
|
136
|
+
expect(result).to eq(false)
|
133
137
|
expect(group.examples[0].metadata[:execution_result].status).to eq(:failed)
|
134
138
|
expect(group.examples[1].metadata[:execution_result].status).to eq(:pending)
|
135
139
|
end
|
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: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Judson Lester
|
@@ -323,14 +323,13 @@ homepage: https://github.com/LRDesign/rspec-steps
|
|
323
323
|
licenses:
|
324
324
|
- MIT
|
325
325
|
metadata: {}
|
326
|
-
post_install_message:
|
327
|
-
Reality Design
|
326
|
+
post_install_message:
|
328
327
|
rdoc_options:
|
329
328
|
- --inline-source
|
330
329
|
- --main
|
331
330
|
- doc/README
|
332
331
|
- --title
|
333
|
-
- rspec-steps-1.0.
|
332
|
+
- rspec-steps-1.0.5 RDoc
|
334
333
|
require_paths:
|
335
334
|
- lib/
|
336
335
|
required_ruby_version: !ruby/object:Gem::Requirement
|