Skip to content

Commit

Permalink
[tests] composable config-override
Browse files Browse the repository at this point in the history
  This commit allows several config_override calls to take effect in
tests.

  Test plan: all unit tests passed.

Change-Id: I8756d90680b3bc9271bc9b3f5e235e6cccdc3c38
  • Loading branch information
d authored and pbozeman committed Oct 10, 2012
1 parent de60cb4 commit a62c816
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -52,8 +52,11 @@ def reset_database(db)
end

module VCAP::CloudController::SpecHelper
# Note that this method is mixed into each example, and so the instance
# variable we created here gets cleared automatically after each example
def config_override(hash)
@config_override = hash
@config_override ||= {}
@config_override.update(hash)
end

def config
Expand Down

0 comments on commit a62c816

Please sign in to comment.