spec/support/integration.rb in engineyard-serverside-1.5.12 vs spec/support/integration.rb in engineyard-serverside-1.5.13.servicespike

- old
+ new

@@ -8,17 +8,15 @@ @commands = [] end # stfu def info(msg) - puts msg @infos << msg end # no really, stfu def debug(msg) - puts msg @debugs << msg end # passwordless sudo is neither guaranteed nor desired def sudo(cmd) @@ -68,29 +66,19 @@ def deploy yield if block_given? super end - class MockFetcher - def initialize(&block) - @block = block - end - - def get(app) - @block.call(app) - end + def services_setup_command + @mock_services_setup_command || "echo 'skipped'" end - def services_fetcher - @mock_fetcher ||= MockFetcher.new { |app| {"some_service_for_#{app}" => {"some_var" => 'some_value'}} } + def mock_services_setup!(value) + @mock_services_setup_command = value end - def set_services_fetcher_value(value) - @mock_fetcher = MockFetcher.new { |app| value } - end - - def services_fetcher_breaks! - @mock_fetcher = MockFetcher.new { |app| raise "Server Broken" } + def mock_services_setup_to_break! + @mock_services_setup_command = "notarealcommandsoitwillexitnonzero" end end module EY::Serverside::Strategies::IntegrationSpec module Helpers