templates/test_spec.rb.erb in onceover-3.3.3 vs templates/test_spec.rb.erb in onceover-3.4.0
- old
+ new
@@ -16,10 +16,25 @@
<% end -%>
<% end -%>
<% test.nodes.each do |node| -%>
context "using fact set <%= node.name %>" do
- let(:facts) { <%= node.fact_set %> }
+ node_facts = <%= node.fact_set %>
+ let(:facts) { node_facts }
+<% if @before_conditions -%>
+ before :each do
+<% @before_conditions.each do |function| -%>
+ <%= function %>
+<% end -%>
+ end
+<% end -%>
+<% if @after_conditions -%>
+ after :each do
+<% @after_conditions.each do |function| -%>
+ <%= function %>
+<% end -%>
+ end
+<% end -%>
<% if pre_condition -%>
let(:pre_condition) {
pp = <%= '<<' %>-END
$onceover_class = '<%= cls.name %>'
$onceover_node = '<%= node.name %>'