Sha256: cbb2a16a844731b90e3ce194225b91cf764aa046b3bd3c6f6e04f29a4470b992

Contents?: true

Size: 475 Bytes

Versions: 40

Compression:

Stored size: 475 Bytes

Contents

require "highline"

module PasswordPromptHelpers
  # This password matches the testing users available on dev machines
  def default_test_password
    "N:B3e%7Cmh"
  end

  # Intercepts HighLine prompting for a password and returns the testing default
  # or a specific value. Otherwise this blocks the specs.
  #
  def mock_password_entry(password = default_test_password)
    expect_any_instance_of(HighLine).to receive(:ask).at_least(:once).and_return(password)
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
brightbox-cli-3.3.0 spec/support/password_prompt_helpers.rb
brightbox-cli-3.2.0 spec/support/password_prompt_helpers.rb
brightbox-cli-3.1.0 spec/support/password_prompt_helpers.rb
brightbox-cli-3.0.1 spec/support/password_prompt_helpers.rb
brightbox-cli-3.0.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.12.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.11.2 spec/support/password_prompt_helpers.rb
brightbox-cli-2.11.1 spec/support/password_prompt_helpers.rb
brightbox-cli-2.11.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.10.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.9.3 spec/support/password_prompt_helpers.rb
brightbox-cli-2.9.2 spec/support/password_prompt_helpers.rb
brightbox-cli-2.9.1 spec/support/password_prompt_helpers.rb
brightbox-cli-2.9.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.8.2 spec/support/password_prompt_helpers.rb
brightbox-cli-2.8.1 spec/support/password_prompt_helpers.rb
brightbox-cli-2.8.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.7.1 spec/support/password_prompt_helpers.rb
brightbox-cli-2.7.0 spec/support/password_prompt_helpers.rb
brightbox-cli-2.6.0 spec/support/password_prompt_helpers.rb