# DEPRECATED: do not use it
When(/^RollingUpdates is (enabled|disabled)$/) do |switch|
  Logic::RollingUpdates.stubs(enabled?: switch == 'enabled')
end

And(/^all the rolling updates features are (on|off)$/) do |state|
  if state
    Logic::RollingUpdates.stubs(enabled?: false)
  else
    Logic::RollingUpdates.stubs(skipped?: true)
    Account.any_instance.stubs(:provider_can_use?).returns(false)
  end
end

When(/^I have (\w+) feature (enabled|disabled)$/) do |feature, enabled|
  Account.any_instance.expects(:provider_can_use?).with(feature.to_sym).returns(enabled == 'enabled' ).at_least_once
end
