rast 0.19.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -3
- data/lib/rast/rules/rule_evaluator.rb +2 -1
- data/lib/rast/spec_dsl.rb +3 -2
- data/rast.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bab01b930678511296037271c46292a6e20b25feaed071a4a534ef245fc08a1
|
4
|
+
data.tar.gz: db9953c5986a4e992cbab5760a2390262bfbd587aaec3cd6e7affaff237525e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1150f55a0bf914f74d66f48c2fc97398e5baf67855b44da1ed71b20bf86eb72c7f2f2a8fad7b654cfa6375ed925f98236f2ac9d16bdcd17d9ec9fc1da9c324b4
|
7
|
+
data.tar.gz: 4b560dd86ce4227ff43fa0a7cb035443a8ea793893c979b8dd5e67d4b50954bc714e96e3c17c8530d900ddf6593b05956d4dd7f9b812dc252b488d69b14d8bd7
|
data/CHANGELOG.md
CHANGED
@@ -2,23 +2,26 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
-
- Add travis-ci build.
|
6
|
-
- Add RubyGems badge
|
7
|
-
- Update documentation.
|
8
5
|
|
9
6
|
## Released
|
10
7
|
|
8
|
+
- 0.19.1 - [bug] nil as configured outcome
|
9
|
+
- [bug] nil showing in the report as empty string.
|
11
10
|
|
12
11
|
- 0.19.0 - [feature] boolean in variables definition to automatically infer
|
13
12
|
false and true
|
14
13
|
[feature] xrast to skip entire test.
|
15
14
|
[feature] Add default outcome in yaml-less configuration. Default
|
16
15
|
config will take higher precedence than boolean outcomes.
|
16
|
+
|
17
17
|
- 0.18.0 - [feature] xspec to skip a test
|
18
18
|
- [feature] Added include rule to isolate scenarios.
|
19
19
|
- [feature] Asterisk can be used as token character.
|
20
20
|
- [bug] Duplicate outcome wasn't detected when there's default config.
|
21
21
|
- [enhancement] Early return for 'and' and 'or' operators.
|
22
|
+
- Add travis-ci build.
|
23
|
+
- Add RubyGems badge
|
24
|
+
- Update documentation.
|
22
25
|
|
23
26
|
- 0.17.0 - Allow default outcome for unmatched scenarios.
|
24
27
|
- 0.16.0 - Allow isolation of scenarios via include clause.
|
@@ -35,7 +35,8 @@ class RuleEvaluator
|
|
35
35
|
Array => DefaultConverter.new,
|
36
36
|
TrueClass => BoolConverter.new,
|
37
37
|
FalseClass => BoolConverter.new,
|
38
|
-
String => StrConverter.new
|
38
|
+
String => StrConverter.new,
|
39
|
+
NilClass => DefaultConverter.new
|
39
40
|
}.freeze
|
40
41
|
|
41
42
|
# /** @param pConverterList list of rule token converters. */
|
data/lib/rast/spec_dsl.rb
CHANGED
@@ -144,7 +144,8 @@ def generate_rspec(scope: nil, scenario: {}, expected: '')
|
|
144
144
|
instance_exec(*block_params, &scope.prepare_block)
|
145
145
|
end
|
146
146
|
|
147
|
-
actual = scope.execute_block.call(*block_params)
|
147
|
+
actual = scope.execute_block.call(*block_params)
|
148
|
+
actual = actual.nil? ? 'nil' : actual.to_s
|
148
149
|
|
149
150
|
expect(actual).to eq(expected)
|
150
151
|
end
|
@@ -160,7 +161,7 @@ end
|
|
160
161
|
|
161
162
|
def build_it(scenario, output, key)
|
162
163
|
output += ', ' unless output == ''
|
163
|
-
calc_key = scenario[key].nil? ? nil : scenario[key]
|
164
|
+
calc_key = scenario[key].nil? ? 'nil' : scenario[key]
|
164
165
|
output + "#{key}: #{calc_key}"
|
165
166
|
end
|
166
167
|
|
data/rast.gemspec
CHANGED