Skip to content
Browse files

Memoizing at the Class level wreaks havoc on the specs.

  • Loading branch information...
1 parent ada41ce commit 02c8d2cb10172ccf0c611fa77d654de2796cf88c @clowder clowder committed Oct 19, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/foreman/utils.rb
  2. +1 −1 spec/foreman/export/bluepill_spec.rb
  3. +1 −1 spec/foreman/export/upstart_spec.rb
View
2 lib/foreman/utils.rb
@@ -3,7 +3,7 @@
class Foreman::Utils
def self.parse_concurrency(concurrency)
- @concurrency ||= begin
+ begin
pairs = concurrency.to_s.gsub(/\s/, "").split(",")
pairs.inject(Hash.new(1)) do |hash, pair|
process, amount = pair.split("=")
View
2 spec/foreman/export/bluepill_spec.rb
@@ -12,7 +12,7 @@
before(:each) { stub(bluepill).say }
it "exports to the filesystem" do
- bluepill.export("/tmp/init")
+ bluepill.export("/tmp/init", :concurrency => "alpha=2")
File.read("/tmp/init/app.pill").should == example_export_file("bluepill/app.pill")
end
View
2 spec/foreman/export/upstart_spec.rb
@@ -12,7 +12,7 @@
before(:each) { stub(upstart).say }
it "exports to the filesystem" do
- upstart.export("/tmp/init")
+ upstart.export("/tmp/init", :concurrency => "alpha=2")
File.read("/tmp/init/app.conf").should == example_export_file("upstart/app.conf")
File.read("/tmp/init/app-alpha.conf").should == example_export_file("upstart/app-alpha.conf")

0 comments on commit 02c8d2c

Please sign in to comment.
Something went wrong with that request. Please try again.