evt-schema-fixtures 0.0.0.2 → 0.0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4aba8e6d289ada91eb6a816228e671406c452d44aadc81ca93436f524e4ce4eb
4
- data.tar.gz: 42b67a76d1e6e6313b24ed1c94e81abc58422df18c3578963582333c60663f31
3
+ metadata.gz: 266e456f9964b2c27ddc8f0b499b3466cdc34add1f8c6860260c85751ca66367
4
+ data.tar.gz: 7d810d1fbdacc719af7cce175e0e488fbbfd29aadb7f8619f331f48f7c22d673
5
5
  SHA512:
6
- metadata.gz: 6fce286c690fc11f9b9fbcb0fec7e0b0f7a8db95bc050eee499d8c9cbf5a9c663a4010490b0e24f64718346f760c4bf798892789c3f31519ef5c75e98a0acb70
7
- data.tar.gz: eeefc8f33ff316b579db3ee86353b19d5c9a14bfed9bd184ccf1954dab3c29077063733bbf3f7603b51e17363e3189f4bf71f597e8b4649b4223c5d966f520ae
6
+ metadata.gz: 73a983194205a73e64fd4fac3cffa08cb7a308a199ec5b387859d39f2112cca81e1a32e387c18638e3021f8868ac86853a759cdfea4bb4dbd2eaf6b5ed71ac9b
7
+ data.tar.gz: f4b4b29742ff0383807e0267d3dea8e5b9226cdb28edd4809aa700be7430fde6fe57027298fe3584a3003dd81b57ff93b82a1acfdf24b106838b0ba1a8d5f83f
@@ -19,6 +19,10 @@ module Schema
19
19
  @attributes_context_name ||= 'Attributes'
20
20
  end
21
21
 
22
+ def schema_class
23
+ comparison.control_class
24
+ end
25
+
22
26
  initializer :comparison, na(:print_title_context), na(:title_context_name), na(:attributes_context_name)
23
27
 
24
28
  def self.build(compare, attribute_names=nil, print_title_context: nil, title_context_name: nil, attributes_context_name: nil)
@@ -27,33 +31,31 @@ module Schema
27
31
  new(comparison, print_title_context, title_context_name, attributes_context_name)
28
32
  end
29
33
 
30
- def call()
31
- schema_class = comparison.control_class
32
-
33
- test_attributes = proc do
34
- context attributes_context_name do
35
- comparison.entries.each do |entry|
36
- default_attribute_value = entry.control_value
37
- attribute_value = entry.compare_value
38
-
39
- test "#{entry.compare_name}" do
40
- detail "Default Value: #{default_attribute_value.inspect}"
41
- detail "Assigned Value: #{attribute_value.inspect}"
42
-
43
- refute(attribute_value == default_attribute_value)
44
- end
45
- end
46
- end
47
- end
48
-
34
+ def call
49
35
  if print_title_context?
50
36
  context "#{title_context_name}" do
51
37
  detail "Class: #{schema_class.name}"
52
38
 
53
- test_attributes.()
39
+ call!
54
40
  end
55
41
  else
56
- test_attributes.()
42
+ call!
43
+ end
44
+ end
45
+
46
+ def call!
47
+ context attributes_context_name do
48
+ comparison.entries.each do |entry|
49
+ default_attribute_value = entry.control_value
50
+ attribute_value = entry.compare_value
51
+
52
+ test "#{entry.compare_name}" do
53
+ detail "Default Value: #{default_attribute_value.inspect}"
54
+ detail "Assigned Value: #{attribute_value.inspect}"
55
+
56
+ refute(attribute_value == default_attribute_value)
57
+ end
58
+ end
57
59
  end
58
60
  end
59
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-schema-fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.2
4
+ version: 0.0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project