cukerail 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 +4 -4
- data/lib/cukerail/version.rb +1 -1
- data/lib/cukerail.rb +13 -3
- 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: 79f05604565fe68cea1631b80c6627ce31b8407e
|
4
|
+
data.tar.gz: 5a8729dd85cef095455869f98fcca70bd643f436
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece6e0a05572fc1705fdcf76ffb2caa03867c52a3d1f14ad2a48784ab24e913c64b351667df84bd3704fadcd0e4a0ef1356e22bfcc39863388a2d7c0906d613d
|
7
|
+
data.tar.gz: 6091144fd6996b46076d81d0f1c5c7c956c8fa476175eb815875a48434c1ac0adb0c4ca3357b88210d1261753d6be0bfd9701a42ca683456046426c4dde1f526
|
data/lib/cukerail/version.rb
CHANGED
data/lib/cukerail.rb
CHANGED
@@ -87,7 +87,9 @@ module Cukerail
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def send_steps(test_case,id)
|
90
|
-
steps_as_string = test_case.test_steps.map{|step| step.source.last}
|
90
|
+
steps_as_string = test_case.test_steps.map{|step| step.source.last}
|
91
|
+
.select{|step| step.is_a?(Cucumber::Core::Ast::Step) && step.respond_to?(:gherkin_statement)}
|
92
|
+
.reject{|step| step.is_a?(Cucumber::Hooks::BeforeHook)}.map do | step |
|
91
93
|
g = step.gherkin_statement
|
92
94
|
str = g.keyword+g.name
|
93
95
|
g.rows.each do | row |
|
@@ -127,10 +129,18 @@ module Cukerail
|
|
127
129
|
{id:6,comment: 'pending step'}
|
128
130
|
end
|
129
131
|
unless result.passed?
|
132
|
+
# the before step can fail. So we have to check
|
133
|
+
if @failed_step[:step].source.last.is_a?(Cucumber::Hooks::BeforeHook)
|
134
|
+
failed_step = 'failed in the before hook'
|
135
|
+
location = 'before hook'
|
136
|
+
else
|
137
|
+
failed_step = "#{@failed_step[:step].source.last.keyword}#{@failed_step[:step].source.last.name}"
|
138
|
+
location=@failed_step[:step].source.last.file_colon_line
|
139
|
+
end
|
130
140
|
failure_message = <<-FAILURE
|
131
141
|
Error message: #{testrail_status[:comment]} #{result.exception.message}
|
132
|
-
Step: #{
|
133
|
-
Location: #{
|
142
|
+
Step: #{failed_step}
|
143
|
+
Location: #{location}
|
134
144
|
FAILURE
|
135
145
|
else
|
136
146
|
failure_message = nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cukerail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Small
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|