qcumberless 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/qcumberless/formatter.rb +27 -31
- data/lib/qcumberless/version.rb +1 -1
- metadata +3 -3
@@ -1,57 +1,53 @@
|
|
1
1
|
require 'cucumber/formatter/pretty'
|
2
2
|
|
3
3
|
module Qcumberless
|
4
|
-
class Formatter
|
5
|
-
def
|
6
|
-
@io.printf("Step: ".indent(@scenario_indent + 2))
|
7
|
-
@io.printf(step.name)
|
8
|
-
@io.printf "\n"
|
9
|
-
@io.flush
|
10
|
-
super
|
4
|
+
class Formatter
|
5
|
+
def initialize(step_mother, path_or_io, options)
|
11
6
|
end
|
12
7
|
|
13
|
-
def
|
8
|
+
def feature_name(keyword, name)
|
9
|
+
print("Feature: " + name + "\n")
|
10
|
+
end
|
11
|
+
|
12
|
+
def scenario_name(keyword, name, file_colon_line, source_indent)
|
13
|
+
print("Scenario: " + name + "\n")
|
14
|
+
end
|
15
|
+
|
16
|
+
def before_step(step)
|
17
|
+
print("Step: " + step.name + "\n")
|
18
|
+
end
|
19
|
+
|
20
|
+
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
|
14
21
|
if exception
|
15
|
-
|
16
|
-
@io.printf(exception)
|
17
|
-
@io.printf("\n")
|
18
|
-
# @io.flush
|
22
|
+
print("Step failed: " + exception + "\n")
|
19
23
|
elsif status == :undefined
|
20
|
-
|
21
|
-
# @io.flush
|
24
|
+
print("Step failed: Step undefined\n")
|
22
25
|
end
|
23
|
-
super
|
24
26
|
end
|
25
27
|
|
26
28
|
def before_outline_table(outline_table)
|
27
|
-
|
28
|
-
@io.flush
|
29
|
+
print("Outline table\n")
|
29
30
|
@header_row = true
|
30
|
-
super
|
31
31
|
end
|
32
32
|
|
33
33
|
def before_table_row(table_row)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
printf("Table row: |")
|
35
|
+
end
|
36
|
+
|
37
|
+
def table_cell_value(value, status)
|
38
|
+
print(value.to_s + "|")
|
39
39
|
end
|
40
40
|
|
41
41
|
def after_table_row(table_row)
|
42
|
+
print("\n")
|
42
43
|
unless @header_row
|
43
44
|
if table_row.exception
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
@io.flush
|
48
|
-
elsif table_row.status == :undefined
|
49
|
-
@io.printf("\nStep failed: Step undefined\n".indent(@scenario_indent + 2))
|
50
|
-
@io.flush
|
45
|
+
print("Step failed: " + table_row.exception + "\n")
|
46
|
+
#elsif table_row.status == :undefined
|
47
|
+
# print("Step failed: Step undefined\n")
|
51
48
|
end
|
52
49
|
end
|
53
50
|
@header_row = false if @header_row
|
54
|
-
super
|
55
51
|
end
|
56
52
|
end
|
57
53
|
end
|
data/lib/qcumberless/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Daniel Andersen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-06-
|
17
|
+
date: 2012-06-18 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|