allure-rspec 0.4.0 → 0.4.1
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/allure-rspec/dsl.rb +3 -3
- data/lib/allure-rspec/version.rb +1 -1
- data/spec/extend_steps_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05082235365532bded92d2552c949b7805673d66
|
4
|
+
data.tar.gz: 7c4da451b610f0a98110e6ab3593f09787ee39e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65e2fa2160ee9d75d5bc5cf1691db2ca4f01d72380bf5f0408d8dcfd7673f9bd7cbcf2a56b5b891fc1891508b9f441d199cc8af5d44bf98cf6fa513805f79017
|
7
|
+
data.tar.gz: 28c23526a6ea7733dbf8820f31768016d11d5e8779e8dd8aae53d746cc7911c20bb5126da606cafa3c9471491d85da95c6bb7c8c69b62127ea9577353d3376e1
|
data/lib/allure-rspec/dsl.rb
CHANGED
@@ -7,7 +7,7 @@ module AllureRSpec
|
|
7
7
|
@@__mutex ||= Mutex.new
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
10
|
+
def current_step
|
11
11
|
if defined? @@__current_step
|
12
12
|
@@__current_step
|
13
13
|
else
|
@@ -18,8 +18,8 @@ module AllureRSpec
|
|
18
18
|
def __with_step(step, &block)
|
19
19
|
__mutex.synchronize do
|
20
20
|
begin
|
21
|
-
Config.rspec.send :run_hook, :before, :step, example
|
22
21
|
@@__current_step = step
|
22
|
+
Config.rspec.send :run_hook, :before, :step, example
|
23
23
|
yield
|
24
24
|
ensure
|
25
25
|
Config.rspec.send :run_hook, :after, :step, example
|
@@ -37,7 +37,7 @@ module AllureRSpec
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def attach_file(title, file)
|
40
|
-
step =
|
40
|
+
step = current_step
|
41
41
|
dir = Pathname.new(AllureRSpec::Config.output_dir)
|
42
42
|
FileUtils.mkdir_p(dir)
|
43
43
|
file_extname = File.extname(file.path.downcase)
|
data/lib/allure-rspec/version.rb
CHANGED
data/spec/extend_steps_spec.rb
CHANGED
@@ -11,16 +11,16 @@ describe AllureRSpec do
|
|
11
11
|
puts "before all"
|
12
12
|
end
|
13
13
|
|
14
|
-
before(:step) do
|
15
|
-
puts "before step"
|
14
|
+
before(:step) do |s|
|
15
|
+
puts "before step #{s.current_step}"
|
16
16
|
end
|
17
17
|
|
18
18
|
before(:each) do
|
19
19
|
puts "before each"
|
20
20
|
end
|
21
21
|
|
22
|
-
after(:step) do
|
23
|
-
puts "after step"
|
22
|
+
after(:step) do |s|
|
23
|
+
puts "after step #{s.current_step}"
|
24
24
|
end
|
25
25
|
|
26
26
|
after(:each) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Sadykov
|
@@ -141,5 +141,5 @@ rubyforge_project:
|
|
141
141
|
rubygems_version: 2.0.3
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
|
-
summary: allure-rspec-0.4.
|
144
|
+
summary: allure-rspec-0.4.1
|
145
145
|
test_files: []
|