Skip to content

Commit

Permalink
Merge pull request #87 from clowder/fix_specs_passing_by_accident
Browse files Browse the repository at this point in the history
Removed memoization [Foreman::Utils.parse_concurrency]
  • Loading branch information
ddollar committed Oct 19, 2011
2 parents ada41ce + 02c8d2c commit c6a410b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/foreman/utils.rb
Expand Up @@ -3,7 +3,7 @@
class Foreman::Utils class Foreman::Utils


def self.parse_concurrency(concurrency) def self.parse_concurrency(concurrency)
@concurrency ||= begin begin
pairs = concurrency.to_s.gsub(/\s/, "").split(",") pairs = concurrency.to_s.gsub(/\s/, "").split(",")
pairs.inject(Hash.new(1)) do |hash, pair| pairs.inject(Hash.new(1)) do |hash, pair|
process, amount = pair.split("=") process, amount = pair.split("=")
Expand Down
2 changes: 1 addition & 1 deletion spec/foreman/export/bluepill_spec.rb
Expand Up @@ -12,7 +12,7 @@
before(:each) { stub(bluepill).say } before(:each) { stub(bluepill).say }


it "exports to the filesystem" do 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") File.read("/tmp/init/app.pill").should == example_export_file("bluepill/app.pill")
end end
Expand Down
2 changes: 1 addition & 1 deletion spec/foreman/export/upstart_spec.rb
Expand Up @@ -12,7 +12,7 @@
before(:each) { stub(upstart).say } before(:each) { stub(upstart).say }


it "exports to the filesystem" do 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.conf").should == example_export_file("upstart/app.conf")
File.read("/tmp/init/app-alpha.conf").should == example_export_file("upstart/app-alpha.conf") File.read("/tmp/init/app-alpha.conf").should == example_export_file("upstart/app-alpha.conf")
Expand Down

0 comments on commit c6a410b

Please sign in to comment.