Sha256: 875834000b74545a559023afbebb4ccbcdf9c3cace867a3cc20651bf90185238

Contents?: true

Size: 724 Bytes

Versions: 7

Compression:

Stored size: 724 Bytes

Contents

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
<%= pre_condition.chomp %>
END
    }
<% end -%>
    it { should compile }
  end
<% end -%>
end

<% end -%>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
onceover-3.0.6 templates/test_spec.rb.erb
onceover-3.0.5 templates/test_spec.rb.erb
onceover-3.0.4 templates/test_spec.rb.erb
onceover-3.0.3 templates/test_spec.rb.erb
onceover-3.0.2 templates/test_spec.rb.erb
onceover-3.0.1 templates/test_spec.rb.erb
onceover-3.0.0 templates/test_spec.rb.erb