require 'spec_helper' <% test.classes.each do |cls| -%> describe "<%= cls.name %>" do <% if @mock_functions -%> <% @mock_functions.each do |function,params| -%> <% if params['type'] == 'statement' -%> MockFunction.new('<%= function %>', {:type => :statement}) <% else -%> let!(:<%= function %>) { MockFunction.new('<%= function %>') { |f| f.stubbed.returns(<%= params['returns'] %>) } } <% end -%> <% end -%> <% end -%> <% test.nodes.each do |node| -%> context "using fact set <%= node.name %>" do let(:facts) { <%= node.fact_set %> } <% if pre_condition -%> let(:pre_condition) { pp = < END } <% end -%> it { should compile } end <% end -%> end <% end -%>