Sha256: 6d4abe5855a9f2d7a851fcb50becb5aab2433e82b6718ad20ec47958d5498840

Contents?: true

Size: 1.09 KB

Versions: 24

Compression:

Stored size: 1.09 KB

Contents

require "spec_helper"
require "foreman/engine"
require "foreman/export/launchd"
require "tmpdir"

describe Foreman::Export::Launchd, :fakefs do
  let(:procfile) { FileUtils.mkdir_p("/tmp/app"); write_procfile("/tmp/app/Procfile") }
  let(:options)  { Hash.new }
  let(:engine)   { Foreman::Engine.new().load_procfile(procfile) }
  let(:launchd)  { Foreman::Export::Launchd.new("/tmp/init", engine, options) }

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

  it "exports to the filesystem" do
    launchd.export
    File.read("/tmp/init/app-alpha-1.plist").should == example_export_file("launchd/launchd-a.default")
    File.read("/tmp/init/app-bravo-1.plist").should == example_export_file("launchd/launchd-b.default")
  end

  context "with multiple command arguments" do
    let(:procfile) { FileUtils.mkdir_p("/tmp/app"); write_procfile("/tmp/app/Procfile", "charlie") }

    it "splits each command argument" do
      launchd.export
      File.read("/tmp/init/app-alpha-1.plist").should == example_export_file("launchd/launchd-c.default")
    end

  end

end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
foreman-0.67.0-mingw32 spec/foreman/export/launchd_spec.rb
foreman-0.67.0-java spec/foreman/export/launchd_spec.rb
foreman-0.67.0 spec/foreman/export/launchd_spec.rb
foreman-0.66.0-mingw32 spec/foreman/export/launchd_spec.rb
foreman-0.66.0-java spec/foreman/export/launchd_spec.rb
foreman-0.66.0 spec/foreman/export/launchd_spec.rb
foreman-0.65.0 spec/foreman/export/launchd_spec.rb
foreman-0.64.0 spec/foreman/export/launchd_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/foreman-0.63.0/spec/foreman/export/launchd_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/foreman-0.63.0/spec/foreman/export/launchd_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/foreman-0.63.0/spec/foreman/export/launchd_spec.rb
foreman-0.63.0-mingw32 spec/foreman/export/launchd_spec.rb
foreman-0.63.0-java spec/foreman/export/launchd_spec.rb
foreman-0.63.0 spec/foreman/export/launchd_spec.rb
foreman-0.62.0-mingw32 spec/foreman/export/launchd_spec.rb
foreman-0.62.0-java spec/foreman/export/launchd_spec.rb
foreman-0.62.0 spec/foreman/export/launchd_spec.rb
foreman-0.61.0-mingw32 spec/foreman/export/launchd_spec.rb
foreman-0.61.0-java spec/foreman/export/launchd_spec.rb
foreman-0.61.0 spec/foreman/export/launchd_spec.rb