opal-spec 0.1.9 → 0.1.10
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/lib/opal/spec/browser_formatter.rb +9 -9
- data/lib/opal/spec/version.rb +1 -1
- metadata +1 -1
@@ -58,13 +58,13 @@ module Spec
|
|
58
58
|
def start
|
59
59
|
raise "Not running in browser" unless Document.body_ready?
|
60
60
|
|
61
|
-
@summary_element =
|
61
|
+
@summary_element = Element '<p class="summary"></p>'
|
62
62
|
@summary_element.append_to_body
|
63
63
|
|
64
|
-
@groups_element =
|
64
|
+
@groups_element = Element '<ul class="example_groups"></ul>'
|
65
65
|
@groups_element.append_to_body
|
66
66
|
|
67
|
-
|
67
|
+
Element("<style>#{ CSS }</style>").append_to_head
|
68
68
|
end
|
69
69
|
|
70
70
|
def finish
|
@@ -76,7 +76,7 @@ module Spec
|
|
76
76
|
@example_group = group
|
77
77
|
@example_group_failed = false
|
78
78
|
|
79
|
-
@group_element =
|
79
|
+
@group_element = Element <<-HTML
|
80
80
|
<li>
|
81
81
|
<span class="group_description">
|
82
82
|
#{ group.description }
|
@@ -84,7 +84,7 @@ module Spec
|
|
84
84
|
</li>
|
85
85
|
HTML
|
86
86
|
|
87
|
-
@example_list =
|
87
|
+
@example_list = Element <<-HTML
|
88
88
|
<ul class="examples"></ul>
|
89
89
|
HTML
|
90
90
|
|
@@ -119,13 +119,13 @@ module Spec
|
|
119
119
|
output += " #{exception.backtrace.join "\n "}\n"
|
120
120
|
end
|
121
121
|
|
122
|
-
wrapper =
|
122
|
+
wrapper = Element('<li class="example failed"></li>')
|
123
123
|
|
124
|
-
description =
|
124
|
+
description = Element <<-HTML
|
125
125
|
<span class="example_description">#{ example.description }</span>
|
126
126
|
HTML
|
127
127
|
|
128
|
-
exception =
|
128
|
+
exception = Element <<-HTML
|
129
129
|
<pre class="exception">#{ output }</pre>
|
130
130
|
HTML
|
131
131
|
|
@@ -137,7 +137,7 @@ module Spec
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def example_passed example
|
140
|
-
out =
|
140
|
+
out = Element <<-HTML
|
141
141
|
<li class="example passed">
|
142
142
|
<span class="example_description">#{ example.description }</span>
|
143
143
|
</li>
|
data/lib/opal/spec/version.rb
CHANGED