pretty_face 0.7 → 0.8
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.
- data/ChangeLog +3 -0
- data/features/feature_pages.feature +5 -5
- data/features/pretty_face_report.feature +3 -3
- data/features/step_definitions/report_steps.rb +2 -2
- data/features/support/logo.png +0 -0
- data/lib/pretty_face/formatter/html.rb +1 -0
- data/lib/pretty_face/formatter/report.rb +4 -0
- data/lib/pretty_face/version.rb +1 -1
- data/pretty_face.gemspec +1 -1
- metadata +43 -32
- checksums.yaml +0 -7
- data/sample_report/LisaCrispin1.png +0 -0
- data/sample_report/LisaCrispin2.png +0 -0
- data/sample_report/blue_s.jpeg +0 -0
- data/sample_report/green_bar.jpeg +0 -0
- data/sample_report/green_check.jpg +0 -0
- data/sample_report/red_bar.gif +0 -0
- data/sample_report/red_x.jpg +0 -0
- data/sample_report/sample_report.html +0 -167
- data/sample_report/some_code/gherkin_formatter_adapter.rb +0 -87
- data/sample_report/some_code/html.rb +0 -655
- data/sample_report/some_code/ordered_xml_markup.rb +0 -24
- data/sample_report/some_code/summary.rb +0 -35
- data/sample_report/yellow_o.jpg +0 -0
@@ -1,24 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'builder'
|
3
|
-
rescue LoadError
|
4
|
-
gem 'builder'
|
5
|
-
require 'builder'
|
6
|
-
end
|
7
|
-
|
8
|
-
module Cucumber
|
9
|
-
module Formatter
|
10
|
-
# Emits attributes ordered alphabetically, so that we can predicatbly test output.
|
11
|
-
class OrderedXmlMarkup < Builder::XmlMarkup #:nodoc:
|
12
|
-
def _insert_attributes(attrs, order=[])
|
13
|
-
return if attrs.nil?
|
14
|
-
keys = attrs.keys.map{|k| k.to_s}
|
15
|
-
keys.sort!
|
16
|
-
keys.reverse! if (attrs.keys - [:version, :encoding] == []) #HACK to ensure the 'version' attribute is first in xml declaration.
|
17
|
-
keys.each do |k|
|
18
|
-
v = attrs[k.to_sym] || attrs[k]
|
19
|
-
@target << %{ #{k}="#{_attr_value(v)}"} if v
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Cucumber
|
2
|
-
module Formatter
|
3
|
-
module Summary
|
4
|
-
|
5
|
-
def scenario_summary(step_mother, &block)
|
6
|
-
scenarios_proc = lambda{|status| step_mother.scenarios(status)}
|
7
|
-
dump_count(step_mother.scenarios.length, "scenario") + dump_status_counts(scenarios_proc, &block)
|
8
|
-
end
|
9
|
-
|
10
|
-
def step_summary(step_mother, &block)
|
11
|
-
steps_proc = lambda{|status| step_mother.steps(status)}
|
12
|
-
dump_count(step_mother.steps.length, "step") + dump_status_counts(steps_proc, &block)
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def dump_status_counts(find_elements_proc)
|
18
|
-
counts = [:failed, :skipped, :undefined, :pending, :passed].map do |status|
|
19
|
-
elements = find_elements_proc.call(status)
|
20
|
-
elements.any? ? yield("#{elements.length} #{status.to_s}", status) : nil
|
21
|
-
end.compact
|
22
|
-
if counts.any?
|
23
|
-
" (#{counts.join(', ')})"
|
24
|
-
else
|
25
|
-
""
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def dump_count(count, what, state=nil)
|
30
|
-
[count, state, "#{what}#{count == 1 ? '' : 's'}"].compact.join(" ")
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
data/sample_report/yellow_o.jpg
DELETED
Binary file
|