kapnismology 1.3.0 → 1.4.0
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.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/kapnismology/evaluation.rb +5 -5
- data/lib/kapnismology/evaluation_collection.rb +1 -1
- data/lib/kapnismology/result.rb +2 -2
- data/lib/kapnismology/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 859b57ad0bcfd973ac47d94e81b75b08cb2cb41f
|
4
|
+
data.tar.gz: b4734961ff460248b62bfca45ef56e4c4e4e64f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9033c19388df24b171acaca2691a88b9f0391a4bdf9196dcd994ced6b37e7f0f5a864cc18dea89b0c797437fe039ce82e637d6c6fd0891df74d8429b5470b3d
|
7
|
+
data.tar.gz: 5496ba4b9cea4d3ab606833b17a510aceb0656ba0b4990ec3c8e106432679b7ffef480f0d10ff35a37a9311ab49e811e9a4f39a803d3f3df03ff73a037117ffc
|
data/README.md
CHANGED
@@ -56,16 +56,17 @@ smoke test class.
|
|
56
56
|
|
57
57
|
## Not runnable tests
|
58
58
|
|
59
|
-
If your test find a situation when it does not make sense, then you can return a `Kapnismology::
|
59
|
+
If your test find a situation when it does not make sense, then you can return a `Kapnismology::NullResult` instead of a `Kapnismology::Result`. Like:
|
60
60
|
```
|
61
61
|
if (File.exist?('that file'))
|
62
62
|
Result.new(....)
|
63
63
|
else
|
64
|
-
|
64
|
+
NullResult.new
|
65
65
|
end
|
66
66
|
```
|
67
67
|
|
68
|
-
|
68
|
+
Be very careful of not returning NullResult when you should be returning a failing Result.
|
69
|
+
NullResult do not need any parameter but you can optionally pass a message.
|
69
70
|
|
70
71
|
## Tagging and running tags
|
71
72
|
|
@@ -12,12 +12,12 @@ module Kapnismology
|
|
12
12
|
@result.passed?
|
13
13
|
end
|
14
14
|
|
15
|
+
def null_result?
|
16
|
+
@result.is_a?(NullResult)
|
17
|
+
end
|
18
|
+
|
15
19
|
def as_json(_options = nil)
|
16
|
-
|
17
|
-
{ @name => @result.to_hash }
|
18
|
-
else
|
19
|
-
{}
|
20
|
-
end
|
20
|
+
{ @name => @result.to_hash }
|
21
21
|
end
|
22
22
|
|
23
23
|
def to_s
|
data/lib/kapnismology/result.rb
CHANGED
@@ -26,9 +26,9 @@ module Kapnismology
|
|
26
26
|
|
27
27
|
# Use this class when your test is not valid in the current situation
|
28
28
|
# For instance when you have a test for deployments that have not happen, etc.
|
29
|
-
class
|
29
|
+
class NullResult
|
30
30
|
attr_reader :message
|
31
|
-
def initialize(message = 'The result could not
|
31
|
+
def initialize(message = 'The result could not be determined')
|
32
32
|
@message = message
|
33
33
|
end
|
34
34
|
def passed?
|
data/lib/kapnismology/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kapnismology
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Polo Carres
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.4.8
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Engine for smoke tests.
|