allure_turnip 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +19 -0
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/Rakefile +17 -0
- data/lib/allure_turnip/formatter.rb +1 -0
- data/lib/allure_turnip/version.rb +1 -1
- data/rspec/file_check_spec.rb +31 -0
- data/rspec/spec_helper.rb +1 -0
- data/spec/steps/steps.rb +6 -1
- metadata +8 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d71432b09244223c990ea3a50e18b52addba8e6c2858aa69e0a5ca9aa6a405d
|
4
|
+
data.tar.gz: d5e833a9f398b21fd4a25610aa1bf8b962dd0f6ab709f3cf9fdfbe4199a22eaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95820a00fbf22bb47745a21fd59eb08ca04d9056476a49b0c4f97e7cab9fdf91fc90345884cd9fd56c8467bd05079a85d67fd8bd60ece9fcb7374e678c655fbe
|
7
|
+
data.tar.gz: 507e947a1c882b9a7d03d8f517013ccfa2b9c28375e727fd28d4634dcae270e1df80477ae8c7fed5ef0c132beb9f23051b4f55889e5356333afae227289c453d
|
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.6.1
|
4
|
+
- 2.5.3
|
5
|
+
- 2.4.5
|
6
|
+
|
7
|
+
before_install:
|
8
|
+
- gem update --system
|
9
|
+
- gem install bundler
|
10
|
+
- gem --version
|
11
|
+
|
12
|
+
deploy:
|
13
|
+
provider: rubygems
|
14
|
+
api_key:
|
15
|
+
secure: QItGlGI6I0qamkYH/Bt+13p8Mhx2pqwCLlssTuDJWcUZ79E/fU6GfmbIOk4PYszpcp39tP7JaevJPdxYDvYe7yi8UPt1Ohxi26T3RE2vaKDTIjp15e2cPfsLGUT1Q0uGLNhnPOzUO9ZUzXGP6wSDeNCwPKZ9xzOEkwm04Epq2ky9QOo6C/jUAMI0HG0CjrGlGb3XqOmrSgIiem2RZLi06peyTDbmJlSqEM7i1uwOe1rlpThOw+L7h1pXypXOIgjEHgcUlR0ORgbq61S52MjXSi06Kkj06rO0/huzgSy1VEX3Y9JE9MwakNCURS6wg5eZkdBNdDxuTpkj4/pvO8uc+PqFkEOgbK5rJ1DGHRd4AmJQ4ZxxkVlTU0OnDZwmUuB6RuZuiS+bhfS/8m6xSvTgUo5WSVcCyK8nroKGrBGxNRrdhSBXWb6RM8yRHiwf0jexUPEYdsvM6qmmBmaGwmW49joz0/XLHUV+YTZAhWfzpNsSIkAMHXYxdxXx5nG0XTFufcLEARbDQxPKk6NN3x2PAMdm78ZLcgYRR4MXyJ4Un1fngpqN+k/Hz4kHR6jKqB+0+hlHkILpLzrd5CyFgzScr022+JKPKCKfyngsSo9IdvacvnJYnX96VXXVPPAJzAmN5HaD21Z3SgVajGr8AKTPSZQZ5qpGJKbYHou+nda1KgY=
|
16
|
+
on:
|
17
|
+
branch: master
|
18
|
+
tags: true
|
19
|
+
repo: aha-oretama/allure_turnip
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Allure Turnip
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/allure_turnip.svg)](http://badge.fury.io/rb/allure-rspec) [![Build Status](https://travis-ci.org/aha-oretama/allure_turnip.svg?branch=master)](https://travis-ci.org/aha-oretama/allure_turnip)
|
4
4
|
|
5
5
|
Adaptor to use the Allure framework along with the [Turnip](https://github.com/jnicklas/turnip).
|
6
6
|
|
@@ -27,7 +27,7 @@ And then include it in your spec_helper.rb:
|
|
27
27
|
require 'allure_turnip'
|
28
28
|
|
29
29
|
RSpec.configure do |c|
|
30
|
-
c.include
|
30
|
+
c.include AllureTurnip::Adaptor
|
31
31
|
end
|
32
32
|
```
|
33
33
|
|
@@ -39,7 +39,7 @@ When you add a `feature_with_filename` option, the suites of the the Allure test
|
|
39
39
|
This options is useful if you have some same feature names. Because Allure overwrites the same feature name's result if there are some same feature names.
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
|
42
|
+
AllureTurnip.configure do |c|
|
43
43
|
c.output_dir = "/whatever/you/like" # default: gen/allure-results
|
44
44
|
c.clean_dir = false # clean the output directory first? (default: true)
|
45
45
|
c.logging_level = Logger::DEBUG # logging level (default: DEBUG)
|
@@ -65,4 +65,4 @@ Feature: Attach File
|
|
65
65
|
step 'attach file' do
|
66
66
|
attach_file "test-file1", Tempfile.new("test")
|
67
67
|
end
|
68
|
-
```
|
68
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
begin
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
RSpec::Core::RakeTask.new(:spec, []) do |t|
|
6
|
+
t.fail_on_error = false
|
7
|
+
t.pattern = 'spec/**{,/*/**}/*.feature'
|
8
|
+
end
|
9
|
+
|
10
|
+
RSpec::Core::RakeTask.new(:rspec => :spec) do |t|
|
11
|
+
t.pattern = 'rspec/**{,/*/**}/*_spec.rb'
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => :rspec
|
15
|
+
rescue LoadError
|
16
|
+
# no rspec available
|
17
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../rspec/spec_helper'
|
2
|
+
|
3
|
+
describe "Check output files" do
|
4
|
+
|
5
|
+
it "There are as many xml files as feature files without blank file" do
|
6
|
+
feature_count = Dir.glob(File.join(__dir__, '../spec/**/*.feature')).select {|file| File.basename(file) != 'blank.feature' }.count
|
7
|
+
xml_count = Dir.glob(File.join(__dir__, '../allure/*.xml')).count
|
8
|
+
|
9
|
+
puts "feature_count:#{feature_count}"
|
10
|
+
puts "xml_count:#{xml_count}#"
|
11
|
+
|
12
|
+
expect(xml_count).to eq(feature_count)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "attach file step create a file" do
|
16
|
+
step_count = 0
|
17
|
+
Dir.glob(File.join(__dir__, '../spec/**/*.feature')).each do |path|
|
18
|
+
File.open(path,"r") do |file|
|
19
|
+
file.read.scan(/attach file/) do
|
20
|
+
step_count += 1
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
file_count = Dir.glob(File.join(__dir__, '../allure/*-attachment')).count
|
25
|
+
|
26
|
+
puts "file_count:#{file_count}#"
|
27
|
+
puts "step_count:#{step_count}#"
|
28
|
+
|
29
|
+
expect(file_count).to eq(step_count)
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'rspec'
|
data/spec/steps/steps.rb
CHANGED
@@ -110,7 +110,12 @@ step "raise error" do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
step 'attach file' do
|
113
|
-
|
113
|
+
random = Random.new(Time.now.usec)
|
114
|
+
file = "test-file#{random.rand(10000)}"
|
115
|
+
temp = Tempfile.new(file)
|
116
|
+
temp.print(file)
|
117
|
+
temp.close
|
118
|
+
attach_file file, temp
|
114
119
|
end
|
115
120
|
|
116
121
|
placeholder :count do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure_turnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aha-oretama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -89,9 +89,11 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
|
+
- ".travis.yml"
|
92
93
|
- Gemfile
|
93
94
|
- Gemfile.lock
|
94
95
|
- README.md
|
96
|
+
- Rakefile
|
95
97
|
- allure_turnip.gemspec
|
96
98
|
- lib/allure_turnip.rb
|
97
99
|
- lib/allure_turnip/adaptor.rb
|
@@ -101,6 +103,8 @@ files:
|
|
101
103
|
- lib/allure_turnip/turnip_extension.rb
|
102
104
|
- lib/allure_turnip/version.rb
|
103
105
|
- logo.png
|
106
|
+
- rspec/file_check_spec.rb
|
107
|
+
- rspec/spec_helper.rb
|
104
108
|
- spec/ambiguous.feature
|
105
109
|
- spec/attach_file.feature
|
106
110
|
- spec/autoload_steps.feature
|
@@ -153,35 +157,5 @@ requirements: []
|
|
153
157
|
rubygems_version: 3.0.2
|
154
158
|
signing_key:
|
155
159
|
specification_version: 4
|
156
|
-
summary: allure_turnip-0.1.
|
157
|
-
test_files:
|
158
|
-
- spec/ambiguous.feature
|
159
|
-
- spec/attach_file.feature
|
160
|
-
- spec/autoload_steps.feature
|
161
|
-
- spec/backgrounds.feature
|
162
|
-
- spec/blank.feature
|
163
|
-
- spec/errors.feature
|
164
|
-
- spec/interpolation.feature
|
165
|
-
- spec/multiline_string.feature
|
166
|
-
- spec/pending.feature
|
167
|
-
- spec/scenario_outline.feature
|
168
|
-
- spec/scenario_outline_multiline_string_substitution.feature
|
169
|
-
- spec/scenario_outline_table_substitution.feature
|
170
|
-
- spec/simple_feature.feature
|
171
|
-
- spec/spec_helper.rb
|
172
|
-
- spec/step_calling.feature
|
173
|
-
- spec/steps/alignment_steps.rb
|
174
|
-
- spec/steps/autoload_steps.rb
|
175
|
-
- spec/steps/backtick_steps.rb
|
176
|
-
- spec/steps/dragon_steps.rb
|
177
|
-
- spec/steps/knight_steps.rb
|
178
|
-
- spec/steps/more_steps.rb
|
179
|
-
- spec/steps/step_calling_steps.rb
|
180
|
-
- spec/steps/steps.rb
|
181
|
-
- spec/steps_for.feature
|
182
|
-
- spec/steps_for_super.feature
|
183
|
-
- spec/steps_with_variations.feature
|
184
|
-
- spec/table.feature
|
185
|
-
- spec/tags.feature
|
186
|
-
- spec/with_backticks.feature
|
187
|
-
- spec/with_comments.feature
|
160
|
+
summary: allure_turnip-0.1.1
|
161
|
+
test_files: []
|