qcumberless 0.0.3 → 0.0.4

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.
@@ -1,57 +1,53 @@
1
1
  require 'cucumber/formatter/pretty'
2
2
 
3
3
  module Qcumberless
4
- class Formatter < Cucumber::Formatter::Pretty
5
- def before_step( step )
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 before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
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
- @io.printf("Step failed: ".indent(@scenario_indent + 2))
16
- @io.printf(exception)
17
- @io.printf("\n")
18
- # @io.flush
22
+ print("Step failed: " + exception + "\n")
19
23
  elsif status == :undefined
20
- @io.printf("Step failed: Step undefined\n".indent(@scenario_indent + 2))
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
- @io.printf("Outline table\n".indent(@scenario_indent + 2))
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
- @io.printf("Table row: ".indent(@scenario_indent + 2))
35
- @io.printf(table_row.name)
36
- @io.printf "\n"
37
- @io.flush
38
- super
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
- @io.printf("\nStep failed: ".indent(@scenario_indent + 2))
45
- @io.printf(table_row.exception)
46
- @io.printf("\n")
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
@@ -1,3 +1,3 @@
1
1
  module Qcumberless
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
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-04 00:00:00 +02:00
17
+ date: 2012-06-18 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency