opal-spec 0.2.1 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -2
- data/Rakefile +1 -8
- data/lib/opal-spec/browser_formatter.rb +10 -2
- data/lib/opal-spec/matchers.rb +1 -1
- data/lib/opal-spec/phantom_formatter.rb +5 -3
- data/lib/opal-spec/version.rb +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -77,8 +77,16 @@ module OpalSpec
|
|
77
77
|
target.appendChild(groups_element);
|
78
78
|
|
79
79
|
var styles = document.createElement('style');
|
80
|
-
styles.
|
81
|
-
|
80
|
+
styles.type = 'text/css';
|
81
|
+
|
82
|
+
if (styles.styleSheet) {
|
83
|
+
styles.styleSheet.cssText = __scope.CSS;
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
styles.appendChild(document.createTextNode(__scope.CSS));
|
87
|
+
}
|
88
|
+
|
89
|
+
document.getElementsByTagName('head')[0].appendChild(styles);
|
82
90
|
}
|
83
91
|
|
84
92
|
@start_time = Time.now.to_f
|
data/lib/opal-spec/matchers.rb
CHANGED
@@ -30,7 +30,7 @@ module OpalSpec
|
|
30
30
|
class BeKindOfMatcher < Matcher
|
31
31
|
def match expected
|
32
32
|
unless expected.kind_of? @actual
|
33
|
-
failure "expected #{expected.inspect} to be a kind of #{@actual}, not #{expected.class}."
|
33
|
+
failure "expected #{expected.inspect} to be a kind of #{@actual.name}, not #{expected.class.name}."
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -6,7 +6,7 @@ module OpalSpec
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def log_green(str)
|
9
|
-
`console.log('\\033[
|
9
|
+
`console.log('\\033[32m' + str + '\\033[0m')`
|
10
10
|
end
|
11
11
|
|
12
12
|
def log_red(str)
|
@@ -18,12 +18,14 @@ module OpalSpec
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def start
|
21
|
+
@start_time = Time.now.to_f
|
21
22
|
end
|
22
23
|
|
23
24
|
def finish
|
25
|
+
time = Time.now.to_f - @start_time
|
24
26
|
if @failed_examples.empty?
|
25
27
|
log "\nFinished"
|
26
|
-
log_green "#{example_count} examples, 0 failures"
|
28
|
+
log_green "#{example_count} examples, 0 failures (time taken: #{time})"
|
27
29
|
finish_with_code(0)
|
28
30
|
else
|
29
31
|
log "\nFailures:"
|
@@ -42,7 +44,7 @@ module OpalSpec
|
|
42
44
|
end
|
43
45
|
|
44
46
|
log "\nFinished"
|
45
|
-
log_red "#{example_count} examples, #{@failed_examples.size} failures"
|
47
|
+
log_red "#{example_count} examples, #{@failed_examples.size} failures (time taken: #{time})"
|
46
48
|
finish_with_code(1)
|
47
49
|
end
|
48
50
|
end
|
data/lib/opal-spec/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-27 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: Opal compatible spec library
|
15
15
|
email: adam@adambeynon.com
|