Skip to content

Commit

Permalink
Expose facts as a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Macchi committed Feb 23, 2018
1 parent 16918d1 commit b2fe56d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/test_spec.rb.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'spec_helper'


<% test.classes.each do |cls| -%>
describe "<%= cls.name %>" do

Expand All @@ -18,7 +19,8 @@ let!(:<%= function %>) { MockFunction.new('<%= function %>') { |f|
<% 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| -%>
Expand Down

0 comments on commit b2fe56d

Please sign in to comment.