Sha256: 5c013d7673c591539c229e4bd91c784ee5b35751c1f6771979cde52904485ecf

Contents?: true

Size: 806 Bytes

Versions: 20

Compression:

Stored size: 806 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
$onceover_class = '<%= cls.name %>'
$onceover_node = '<%= node.name %>'
<%= pre_condition.chomp %>
END
    }
<% end -%>
    it { should compile }
  end
<% end -%>
end

<% end -%>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
onceover-3.3.3 templates/test_spec.rb.erb
onceover-3.3.2 templates/test_spec.rb.erb
onceover-3.3.1 templates/test_spec.rb.erb
onceover-3.3.0 templates/test_spec.rb.erb
onceover-3.2.8 templates/test_spec.rb.erb
onceover-3.2.7 templates/test_spec.rb.erb
onceover-3.2.6 templates/test_spec.rb.erb
onceover-3.2.5 templates/test_spec.rb.erb
onceover-3.2.4 templates/test_spec.rb.erb
onceover-3.2.3 templates/test_spec.rb.erb
onceover-3.2.2 templates/test_spec.rb.erb
onceover-3.2.1 templates/test_spec.rb.erb
onceover-3.2.0 templates/test_spec.rb.erb
onceover-3.1.1 templates/test_spec.rb.erb
onceover-3.1.0 templates/test_spec.rb.erb
onceover-3.0.11 templates/test_spec.rb.erb
onceover-3.0.10 templates/test_spec.rb.erb
onceover-3.0.9 templates/test_spec.rb.erb
onceover-3.0.8 templates/test_spec.rb.erb
onceover-3.0.7 templates/test_spec.rb.erb