Fix export specs
This commit is contained in:
@@ -11,10 +11,6 @@ describe Foreman::Export::Bluepill do
|
||||
before(:each) { load_export_templates_into_fakefs("bluepill") }
|
||||
before(:each) { stub(bluepill).say }
|
||||
|
||||
def normalize_space(s)
|
||||
s.gsub(/\n[\n\s]*/, "\n")
|
||||
end
|
||||
|
||||
it "exports to the filesystem" do
|
||||
bluepill.export("/tmp/init")
|
||||
normalize_space(File.read("/tmp/init/app.pill")).should == normalize_space(example_export_file("bluepill/app.pill"))
|
||||
|
||||
@@ -14,7 +14,7 @@ describe Foreman::Export::Runit do
|
||||
|
||||
it "exports to the filesystem" do
|
||||
FileUtils.mkdir_p('/tmp/init')
|
||||
runit.export('/tmp/init', :concurrency => 'alpha=2')
|
||||
runit.export('/tmp/init', :concurrency => "alpha=2,bravo=1")
|
||||
|
||||
File.read("/tmp/init/app-alpha-1/run").should == example_export_file('runit/app-alpha-1-run')
|
||||
File.read("/tmp/init/app-alpha-1/log/run").should ==
|
||||
|
||||
@@ -73,6 +73,10 @@ def preserving_env
|
||||
end
|
||||
end
|
||||
|
||||
def normalize_space(s)
|
||||
s.gsub(/\n[\n\s]*/, "\n")
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.color_enabled = true
|
||||
config.order = 'rand'
|
||||
|
||||
Reference in New Issue
Block a user