Sha256: 7be98278f087228fd4dc02e71723e2e3d632eab3a919969ca233d6077bdd7fcc

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

require "spec_helper"
require "foreman/export/upstart"

describe Foreman::Export::Upstart do
  let(:engine) { Foreman::Engine.new(write_procfile) }
  let(:upstart) { Foreman::Export::Upstart.new(engine) }

  before(:each) { load_export_templates_into_fakefs("upstart") }
  before(:each) { stub(upstart).say }

  it "exports to the filesystem" do
    upstart.export("/tmp/init")

    File.read("/tmp/init/foreman.conf").should         == example_export_file("upstart/foreman.conf")
    File.read("/tmp/init/foreman-alpha.conf").should   == example_export_file("upstart/foreman-alpha.conf")
    File.read("/tmp/init/foreman-alpha-1.conf").should == example_export_file("upstart/foreman-alpha-1.conf")
    File.read("/tmp/init/foreman-alpha-2.conf").should == example_export_file("upstart/foreman-alpha-2.conf")
    File.read("/tmp/init/foreman-bravo.conf").should   == example_export_file("upstart/foreman.bravo.conf")
    File.read("/tmp/init/foreman-bravo-1.conf").should == example_export_file("upstart/foreman-bravo-1.conf")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman-0.15.0 spec/foreman/export/upstart_spec.rb
foreman-0.14.0 spec/foreman/export/upstart_spec.rb