lib/onceover/testconfig.rb in onceover-3.3.3 vs lib/onceover/testconfig.rb in onceover-3.4.0
- old
+ new
@@ -21,10 +21,12 @@
attr_accessor :opts
attr_accessor :filter_tags
attr_accessor :filter_classes
attr_accessor :filter_nodes
attr_accessor :mock_functions
+ attr_accessor :before_conditions
+ attr_accessor :after_conditions
attr_accessor :skip_r10k
attr_accessor :strict_variables
def initialize(file, opts = {})
begin
@@ -33,18 +35,20 @@
raise "Could not find #{file}"
rescue Psych::SyntaxError
raise "Could not parse #{file}, check that it is valid YAML and that the encoding is correct"
end
- @classes = []
- @nodes = []
- @node_groups = []
- @class_groups = []
- @spec_tests = []
- @acceptance_tests = []
- @opts = opts
- @mock_functions = config['functions']
- @strict_variables = opts[:strict_variables] ? 'yes' : 'no'
+ @classes = []
+ @nodes = []
+ @node_groups = []
+ @class_groups = []
+ @spec_tests = []
+ @acceptance_tests = []
+ @opts = opts
+ @mock_functions = config['functions']
+ @before_conditions = config['before']
+ @after_conditions = config['after']
+ @strict_variables = opts[:strict_variables] ? 'yes' : 'no'
# Initialise all of the classes and nodes
config['classes'].each { |clarse| Onceover::Class.new(clarse) } unless config['classes'] == nil
@classes = Onceover::Class.all