Skip to content
This repository
Browse code

Merge pull request #87 from clowder/fix_specs_passing_by_accident

Removed memoization [Foreman::Utils.parse_concurrency]
  • Loading branch information...
commit c6a410b664c94e32ee61c21ae24940c8efb19704 2 parents ada41ce + 02c8d2c
David Dollar authored
2  lib/foreman/utils.rb
@@ -3,7 +3,7 @@
3 3 class Foreman::Utils
4 4
5 5 def self.parse_concurrency(concurrency)
6   - @concurrency ||= begin
  6 + begin
7 7 pairs = concurrency.to_s.gsub(/\s/, "").split(",")
8 8 pairs.inject(Hash.new(1)) do |hash, pair|
9 9 process, amount = pair.split("=")
2  spec/foreman/export/bluepill_spec.rb
@@ -12,7 +12,7 @@
12 12 before(:each) { stub(bluepill).say }
13 13
14 14 it "exports to the filesystem" do
15   - bluepill.export("/tmp/init")
  15 + bluepill.export("/tmp/init", :concurrency => "alpha=2")
16 16
17 17 File.read("/tmp/init/app.pill").should == example_export_file("bluepill/app.pill")
18 18 end
2  spec/foreman/export/upstart_spec.rb
@@ -12,7 +12,7 @@
12 12 before(:each) { stub(upstart).say }
13 13
14 14 it "exports to the filesystem" do
15   - upstart.export("/tmp/init")
  15 + upstart.export("/tmp/init", :concurrency => "alpha=2")
16 16
17 17 File.read("/tmp/init/app.conf").should == example_export_file("upstart/app.conf")
18 18 File.read("/tmp/init/app-alpha.conf").should == example_export_file("upstart/app-alpha.conf")

0 comments on commit c6a410b

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