allure-rspec 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cf7e312ea46166d60262ec61fa426a19e63624b9
4
+ data.tar.gz: f56037ec76feb917bb076ac99afffa2e5cadc80c
5
+ SHA512:
6
+ metadata.gz: ca3c56021a048c2716bcfa9d0164df38905d57ee57825c94198f176672d10ee34a3c278a202844675cec0c74e528e1b173e7c6338bb1a1af134ec416a31f8c71
7
+ data.tar.gz: ea8a29f9fe699c5f2b4b4b08c21afb025f406223dc0332def2cd4455c40d4bdbfea11a9d42c8ee6473e0ceb8681eabe16db2dbe7e8ca2e561a8dfb37c6bbe332
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  *.ear
7
7
  *.gem
8
8
 
9
+ allure-report
9
10
  target
10
11
  allure
11
12
  .idea
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- allure-rspec (0.6.1)
4
+ allure-rspec (0.6.2)
5
5
  allure-ruby-adaptor-api (= 0.6.3)
6
6
  rspec (= 3.0.0)
7
7
 
@@ -15,9 +15,14 @@ module AllureRSpec
15
15
  def step(step, &block)
16
16
  suite = metadata[:example_group][:description_args].first.to_s
17
17
  test = metadata[:description].to_s
18
- AllureRubyAdaptorApi::Builder.start_step(suite, test, step)
19
- __with_step step, &block
20
- AllureRubyAdaptorApi::Builder.stop_step(suite, test, step)
18
+ begin
19
+ AllureRubyAdaptorApi::Builder.start_step(suite, test, step)
20
+ __with_step step, &block
21
+ AllureRubyAdaptorApi::Builder.stop_step(suite, test, step)
22
+ rescue Exception => e
23
+ AllureRubyAdaptorApi::Builder.stop_step(suite, test, step, :failed)
24
+ raise e
25
+ end
21
26
  end
22
27
 
23
28
  def attach_file(title, file, opts = {})
@@ -12,7 +12,7 @@ module AllureRSpec
12
12
 
13
13
  def hooks
14
14
  if @__hooks.nil?
15
- old = old_hooks
15
+ old = old_hooks
16
16
  @__hooks ||= OverridenHookCollections.new(old.instance_variable_get(:@owner), old.instance_variable_get(:@data))
17
17
  [:before, :after].each { |scope|
18
18
  @__hooks[scope][:step] = HookCollection.new
@@ -20,12 +20,13 @@ module AllureRSpec
20
20
  end
21
21
  @__hooks
22
22
  end
23
+
23
24
  private
24
25
 
25
26
  class OverridenHookCollections < RSpec::Core::Hooks::HookCollections
26
27
  private
27
28
 
28
- SCOPES = [:each, :all, :suite, :step]
29
+ SCOPES = [:example, :context, :suite, :step]
29
30
 
30
31
  def before_step_hooks_for(example)
31
32
  RSpec::Core::Hooks::HookCollection.new(RSpec::Core::FlatMap.flat_map(@owner.parent_groups.reverse) do |a|
@@ -1,5 +1,5 @@
1
1
  module AllureRSpec # :nodoc:
2
2
  module Version # :nodoc:
3
- STRING = '0.6.1'
3
+ STRING = '0.6.2'
4
4
  end
5
5
  end
@@ -3,12 +3,12 @@ require 'tempfile'
3
3
 
4
4
  describe "Some another spec", :feature => ["Some Feature"], :severity => :normal do
5
5
 
6
- before(:each) do
7
- puts "before each"
6
+ before(:suite) do
7
+ puts "before suite"
8
8
  end
9
9
 
10
- after(:each) do
11
- puts "after each"
10
+ after(:suite) do
11
+ puts "after suite"
12
12
  end
13
13
 
14
14
  it "10 cannot be greater than 19", :story => ["Some story"] do
@@ -7,31 +7,31 @@ describe AllureRSpec, :feature => "Basics" do
7
7
  puts "before suite"
8
8
  end
9
9
 
10
- before(:all) do
11
- puts "before all"
10
+ before(:context) do
11
+ puts "before context"
12
12
  end
13
13
 
14
14
  before(:step) do |s|
15
15
  puts "before step #{s.current_step}"
16
16
  end
17
17
 
18
- before(:each) do
19
- puts "before each"
18
+ before(:example) do
19
+ puts "before example"
20
20
  end
21
21
 
22
22
  after(:step) do |s|
23
23
  puts "after step #{s.current_step}"
24
24
  end
25
25
 
26
- after(:each) do
27
- puts "after each"
26
+ after(:example) do
27
+ puts "after example"
28
28
  end
29
29
 
30
30
  after(:suite) do
31
31
  puts "after suite"
32
32
  end
33
33
 
34
- after(:all) do
34
+ after(:context) do
35
35
  puts "after all"
36
36
  end
37
37
 
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
5
- prerelease:
4
+ version: 0.6.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ilya Sadykov
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-08-22 00:00:00.000000000 Z
11
+ date: 2014-08-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: allure-ruby-adaptor-api
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - '='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - '='
44
39
  - !ruby/object:Gem::Version
@@ -46,33 +41,29 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: Adaptor to use Allure framework along with the RSpec 2
@@ -100,26 +91,26 @@ files:
100
91
  homepage: http://allure.qatools.ru
101
92
  licenses:
102
93
  - Apache2
94
+ metadata: {}
103
95
  post_install_message:
104
96
  rdoc_options: []
105
97
  require_paths:
106
98
  - lib
107
99
  required_ruby_version: !ruby/object:Gem::Requirement
108
- none: false
109
100
  requirements:
110
- - - ! '>='
101
+ - - '>='
111
102
  - !ruby/object:Gem::Version
112
103
  version: '0'
113
104
  required_rubygems_version: !ruby/object:Gem::Requirement
114
- none: false
115
105
  requirements:
116
- - - ! '>='
106
+ - - '>='
117
107
  - !ruby/object:Gem::Version
118
108
  version: '0'
119
109
  requirements: []
120
110
  rubyforge_project:
121
- rubygems_version: 1.8.25
111
+ rubygems_version: 2.0.3
122
112
  signing_key:
123
- specification_version: 3
124
- summary: allure-rspec-0.6.1
113
+ specification_version: 4
114
+ summary: allure-rspec-0.6.2
125
115
  test_files: []
116
+ has_rdoc: