Sha256: 87f59e3c378056c92df5ea4c9c17162bb644aeec652c521d60415c1d5a05196c

Contents?: true

Size: 930 Bytes

Versions: 17

Compression:

Stored size: 930 Bytes

Contents

#!/usr/bin/env ruby

Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }

require 'puppet/reports'

processor = Puppet::Reports.report(:rrdgraph)

describe processor do
  include PuppetSpec::Files
  before do
    Puppet[:rrddir] = tmpdir('rrdgraph')
    Puppet.settings.use :master
  end

  after do
    FileUtils.rm_rf(Puppet[:rrddir])
  end

  it "should not error on 0.25.x report format" do
    report = YAML.load_file(File.join(PuppetSpec::FIXTURE_DIR, 'yaml/report0.25.x.yaml')).extend processor
    report.expects(:mkhtml)
    lambda{ report.process }.should_not raise_error
  end

  it "should not error on 2.6.x report format" do
    report = YAML.load_file(File.join(PuppetSpec::FIXTURE_DIR, 'yaml/report2.6.x.yaml')).extend processor
    report.expects(:mkhtml)
    lambda{ report.process }.should_not raise_error
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.17 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.16 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.15 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.14 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.13 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.12 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.11 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.10 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.9 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.8 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.7 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.6 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.5 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.4 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.3 spec/unit/reports/rrdgraph_spec.rb
puppet-2.6.2 spec/unit/reports/rrdgraph_spec.rb