ichnite 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ichnite/testing.rb +14 -5
- data/lib/ichnite/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8356832e68c689347200de1532c4b5ee6c878905
|
4
|
+
data.tar.gz: 6eec0f10c9ad8f9f4cee5e337c45ff0f874b4ab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4835f9417bd793d5101e9aaebf84e65f8cd4bc4a6137ffa9b93534f445699a74a5523c1263dea2c9bf870891ad8cb32563f56ebbe7516dbb514ba645658081c5
|
7
|
+
data.tar.gz: 72040b57c125facae786106773580f5adb03ad9179b35b62954fd0ebf5005d48c2975bca74fd33c6eabf45fcecff0b760b2a5294e0abb720c7c7c7a2a916802e
|
data/lib/ichnite/testing.rb
CHANGED
@@ -16,8 +16,9 @@ module Ichnite
|
|
16
16
|
@buffer.truncate(0)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
|
19
|
+
def emit(data)
|
20
|
+
event = data.dup
|
21
|
+
@events << [event.delete(:event), event]
|
21
22
|
super
|
22
23
|
end
|
23
24
|
|
@@ -32,17 +33,25 @@ module Ichnite
|
|
32
33
|
end
|
33
34
|
|
34
35
|
def assert_ichnite_log(expected)
|
35
|
-
assert_equal [expected],
|
36
|
+
assert_equal [expected], ichnite_logs
|
36
37
|
end
|
37
38
|
|
38
39
|
def assert_ichnite_logs(*expected)
|
39
|
-
assert_equal expected,
|
40
|
+
assert_equal expected, ichnite_logs
|
40
41
|
end
|
41
42
|
|
42
|
-
def
|
43
|
+
def assert_ichnite_events(*expected)
|
44
|
+
assert_equal expected, ichnite_events
|
45
|
+
end
|
46
|
+
|
47
|
+
def ichnite_logs
|
43
48
|
ichnite_logger.output.split("\n").map { |line| line.split("INFO -- : ").last }
|
44
49
|
end
|
45
50
|
|
51
|
+
def ichnite_events
|
52
|
+
ichnite_logger.events
|
53
|
+
end
|
54
|
+
|
46
55
|
def ichnite_logger
|
47
56
|
Ichnite.default_logger
|
48
57
|
end
|
data/lib/ichnite/version.rb
CHANGED