gnawrnip 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/gemfiles/{Gemfile-rspec-3.3.x → Gemfile-rspec-3.5.x} +1 -1
- data/gnawrnip.gemspec +1 -1
- data/lib/gnawrnip/step_screenshot.rb +7 -4
- data/lib/gnawrnip/version.rb +1 -1
- data/spec/gnawrnip/step_screenshot_spec.rb +6 -3
- data/spec/spec_helper.rb +11 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd3cc4e3bd4c40fafbfbde1de7033497a6511ca6
|
4
|
+
data.tar.gz: 5432c3e4daaf56b0c4195993876006a2ae1918c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f46301167ab4ff8eb05a5a22210bedd13a8a4fd992fef69415d2df0ab665cb93ec702b0997d2fe3c261760ee8b48bbce1ef80347b3d7de45978f6bba19261f
|
7
|
+
data.tar.gz: 11e7c2b073ae305b1f207dc10684a3a8a369009ef6c5e1f2380feb108e46105cbde18e6efcf04a93584baf04bfb4e1f81af188594f67df477e0fa8542098e256
|
data/.travis.yml
CHANGED
data/gnawrnip.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency 'capybara', "~> 2.2"
|
22
|
-
spec.add_dependency 'turnip_formatter', '~> 0.
|
22
|
+
spec.add_dependency 'turnip_formatter', '~> 0.6.0'
|
23
23
|
spec.add_dependency 'oily_png'
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake"
|
@@ -1,16 +1,19 @@
|
|
1
|
-
require 'turnip_formatter/step_template/
|
1
|
+
require 'turnip_formatter/step_template/base'
|
2
2
|
require 'gnawrnip/developer'
|
3
3
|
|
4
4
|
module Gnawrnip
|
5
|
-
class StepScreenshot < TurnipFormatter::StepTemplate::
|
5
|
+
class StepScreenshot < TurnipFormatter::StepTemplate::Base
|
6
6
|
on_failed :build
|
7
7
|
|
8
8
|
def self.css
|
9
9
|
File.read(File.dirname(__FILE__) + '/gnawrnip.css')
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
#
|
13
|
+
# @param [TurnipFormatter::Resource::Step::Failure] step
|
14
|
+
#
|
15
|
+
def build(step)
|
16
|
+
images = step.example.metadata[:gnawrnip][:screenshot]
|
14
17
|
|
15
18
|
case images.length
|
16
19
|
when 0
|
data/lib/gnawrnip/version.rb
CHANGED
@@ -10,12 +10,15 @@ module Gnawrnip
|
|
10
10
|
allow(template).to receive(:develop).and_return('')
|
11
11
|
end
|
12
12
|
|
13
|
-
let(:
|
13
|
+
let(:step) do
|
14
14
|
metadata = { gnawrnip: { screenshot: paths } }
|
15
|
-
|
15
|
+
|
16
|
+
double('step', example: { metadata: metadata }).tap do |step|
|
17
|
+
allow(step).to receive_message_chain(:example, :metadata) { metadata }
|
18
|
+
end
|
16
19
|
end
|
17
20
|
|
18
|
-
subject { template.build(
|
21
|
+
subject { template.build(step) }
|
19
22
|
|
20
23
|
context 'has multiple data' do
|
21
24
|
let(:paths) do
|
data/spec/spec_helper.rb
CHANGED
@@ -32,3 +32,14 @@ module Capybara
|
|
32
32
|
GnawrnipTest::Session.new
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
require 'rspec/core/sandbox'
|
37
|
+
|
38
|
+
RSpec.configure do |c|
|
39
|
+
c.around :each do |ex|
|
40
|
+
RSpec::Core::Sandbox.sandboxed do |config|
|
41
|
+
load 'gnawrnip/rspec.rb'
|
42
|
+
ex.run
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gnawrnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wataru MIYAGUNI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.6.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: oily_png
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,8 +128,8 @@ files:
|
|
128
128
|
- example/spec/spec_helper.rb
|
129
129
|
- example/spec/steps/hello_steps.rb
|
130
130
|
- example/web.rb
|
131
|
-
- gemfiles/Gemfile-rspec-3.3.x
|
132
131
|
- gemfiles/Gemfile-rspec-3.4.x
|
132
|
+
- gemfiles/Gemfile-rspec-3.5.x
|
133
133
|
- gnawrnip.gemspec
|
134
134
|
- lib/gnawrnip.rb
|
135
135
|
- lib/gnawrnip/developer.rb
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
172
|
rubyforge_project:
|
173
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.5.1
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: Add-on for TurnipFormatter with Capybara
|