rspec-steps 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dd88aff3ac30447e633effb2d644bed299036f5f
4
+ data.tar.gz: e0a510a46640f6db0c5a6e51046c4c69f9200f51
5
+ SHA512:
6
+ metadata.gz: 38a571f6c14a47374d4106b90dca48d239654f529e9fb604d84192fcb196975793058e50bf5f8a1d45ec030cfa29cab5923828549bd81ec15141681cc2129e4e
7
+ data.tar.gz: 96f0c95060630dae694322a0b1b55666bfd2853abcbb77ab6b1364292523b1ed64edb80a2d5cd3ea423bb6ae88f9d2407db5e8917ebd432b78aacdeccd534141
data/lib/rspec-steps.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require 'rspec-steps/duckpunch/object-extensions'
2
2
  require 'rspec-steps/duckpunch/example-group'
3
+ require 'rspec-steps/duckpunch/example'
@@ -0,0 +1,5 @@
1
+ RSpec::Core::Example.class_eval do
2
+ def exception
3
+ @exception
4
+ end
5
+ end
@@ -55,7 +55,7 @@ module RSpecStepwise
55
55
  end
56
56
 
57
57
  module ClassMethods
58
- #TODO: This is hacky and needs a more general solution
58
+ #This is hacky and needs a more general solution
59
59
  #Something like cloning the current conf and having RSpec::Stepwise::config ?
60
60
  def suspend_transactional_fixtures
61
61
  if self.respond_to? :use_transactional_fixtures
@@ -112,6 +112,12 @@ module RSpecStepwise
112
112
  suspend_transactional_fixtures do
113
113
  whole_list_example.run(instance, reporter)
114
114
  end
115
+
116
+ unless whole_list_example.exception.nil?
117
+ RSpec.wants_to_quit = true if fail_fast?
118
+ fail_filtered_examples(whole_list_example.exception, reporter)
119
+ end
120
+
115
121
  end
116
122
  end
117
123
 
@@ -29,6 +29,25 @@ describe RSpec::Core::ExampleGroup, "defined as stepwise" do
29
29
  end
30
30
  end
31
31
 
32
+ it "should mark later examples as failed if a before hook fails" do
33
+ group = nil
34
+ exception = Exception.new "Testing Error"
35
+
36
+ sandboxed do
37
+ group = steps "Test Steps" do
38
+ before { raise exception }
39
+ it { 1.should == 1 }
40
+ it { 1.should == 1 }
41
+ end
42
+ group.run
43
+ end
44
+
45
+ group.examples.each do |example|
46
+ example.metadata[:execution_result][:status].should == 'failed'
47
+ example.metadata[:execution_result][:exception].should == exception
48
+ end
49
+ end
50
+
32
51
  it "should mark later examples as pending if one fails" do
33
52
  group = nil
34
53
  sandboxed do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-steps
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.1
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Judson Lester
@@ -10,64 +9,47 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-11-06 00:00:00.000000000 Z
12
+ date: 2013-12-31 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- prerelease: false
17
- type: :development
18
15
  name: corundum
19
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
20
17
  requirements:
21
- - - ! '>='
18
+ - - '>='
22
19
  - !ruby/object:Gem::Version
23
20
  version: 0.0.25
24
- none: false
25
- requirement: !ruby/object:Gem::Requirement
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
26
24
  requirements:
27
- - - ! '>='
25
+ - - '>='
28
26
  - !ruby/object:Gem::Version
29
27
  version: 0.0.25
30
- none: false
31
28
  - !ruby/object:Gem::Dependency
32
- prerelease: false
33
- type: :runtime
34
29
  name: rspec
35
- version_requirements: !ruby/object:Gem::Requirement
30
+ requirement: !ruby/object:Gem::Requirement
36
31
  requirements:
37
- - - ! '>='
32
+ - - '>='
38
33
  - !ruby/object:Gem::Version
39
- segments:
40
- - 2
41
- - 6
42
34
  version: '2.6'
43
35
  - - <
44
36
  - !ruby/object:Gem::Version
45
- segments:
46
- - 2
47
- - 14
48
- - 0
49
37
  version: 2.14.0
50
- none: false
51
- requirement: !ruby/object:Gem::Requirement
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
52
41
  requirements:
53
- - - ! '>='
42
+ - - '>='
54
43
  - !ruby/object:Gem::Version
55
- segments:
56
- - 2
57
- - 6
58
44
  version: '2.6'
59
45
  - - <
60
46
  - !ruby/object:Gem::Version
61
- segments:
62
- - 2
63
- - 14
64
- - 0
65
47
  version: 2.14.0
66
- none: false
67
- description: ! " I don't like Cucumber. I don't need plain text stories. My clients
68
- either\n read code or don't read any test documents, so Cucumber is mostly useless
69
- to me.\n But often, especially in full integration tests, it would be nice to have\n
70
- \ 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.
71
53
  email:
72
54
  - judson@lrdesign.com
73
55
  - evan@lrdesign.com
@@ -196,6 +178,7 @@ files:
196
178
  - lib/rspec-steps.rb
197
179
  - lib/rspec-steps/stepwise.rb
198
180
  - lib/rspec-steps/duckpunch/example-group.rb
181
+ - lib/rspec-steps/duckpunch/example.rb
199
182
  - lib/rspec-steps/duckpunch/object-extensions.rb
200
183
  - doc/README
201
184
  - doc/Specifications
@@ -324,6 +307,7 @@ files:
324
307
  homepage: https://github.com/LRDesign/rspec-steps
325
308
  licenses:
326
309
  - MIT
310
+ metadata: {}
327
311
  post_install_message: Another tidy package brought to you by Judson Lester of Logical
328
312
  Reality Design
329
313
  rdoc_options:
@@ -331,27 +315,22 @@ rdoc_options:
331
315
  - --main
332
316
  - doc/README
333
317
  - --title
334
- - rspec-steps-0.1.1 RDoc
318
+ - rspec-steps-0.1.2 RDoc
335
319
  require_paths:
336
320
  - lib/
337
321
  required_ruby_version: !ruby/object:Gem::Requirement
338
322
  requirements:
339
- - - ! '>='
323
+ - - '>='
340
324
  - !ruby/object:Gem::Version
341
- segments:
342
- - 0
343
- hash: -147701745
344
325
  version: '0'
345
- none: false
346
326
  required_rubygems_version: !ruby/object:Gem::Requirement
347
327
  requirements:
348
- - - ! '>='
328
+ - - '>='
349
329
  - !ruby/object:Gem::Version
350
330
  version: '0'
351
- none: false
352
331
  requirements: []
353
332
  rubyforge_project: rspec-steps
354
- rubygems_version: 1.8.24
333
+ rubygems_version: 2.0.3
355
334
  signing_key:
356
335
  specification_version: 3
357
336
  summary: I want steps in RSpec