Sha256: 5cbd47884059bb940390a56b178128d2727cabddb4028195c0de2221a18066ea

Contents?: true

Size: 471 Bytes

Versions: 43

Compression:

Stored size: 471 Bytes

Contents

module InteractHelper
  def stub_ask(*args, &block)
    CF::CLI.any_instance.stub(:ask).with(*args, &block)
  end

  def should_ask(*args, &block)
    CF::CLI.any_instance.should_receive(:ask).with(*args, &block)
  end

  def dont_allow_ask(*args)
    CF::CLI.any_instance.should_not_receive(:ask).with(*args)
  end

  def mock_with_progress(message)
    CF::CLI.any_instance.should_receive(:with_progress).with(message) do |_, &block|
      block.call
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
cf-4.2.7 spec/support/interact_helper.rb
cf-4.2.6 spec/support/interact_helper.rb
cf-4.2.5 spec/support/interact_helper.rb
cf-4.2.4 spec/support/interact_helper.rb
cf-4.2.3 spec/support/interact_helper.rb
cf-4.2.2.rc3 spec/support/interact_helper.rb
cf-4.2.2.rc2 spec/support/interact_helper.rb
cf-4.2.2.rc1 spec/support/interact_helper.rb
cf-4.2.1 spec/support/interact_helper.rb
cf-4.2.1.rc3 spec/support/interact_helper.rb
cf-4.2.1.rc2 spec/support/interact_helper.rb
cf-4.2.1.rc1 spec/support/interact_helper.rb
cf-4.2.0 spec/support/interact_helper.rb
cf-4.1.5.rc7 spec/support/interact_helper.rb
cf-4.1.5.rc6 spec/support/interact_helper.rb
cf-4.1.5.rc5 spec/support/interact_helper.rb
cf-4.1.5.rc4 spec/support/interact_helper.rb
cf-4.1.5.rc3 spec/support/interact_helper.rb
cf-4.1.5.rc2 spec/support/interact_helper.rb
cf-4.1.5.rc1 spec/support/interact_helper.rb