Sha256: a14784685029e4242b48af065fae6fa4b25187ee5fc281206e2b80cadedcddcb

Contents?: true

Size: 1.3 KB

Versions: 70

Compression:

Stored size: 1.3 KB

Contents

require "vagrant-spec/acceptance/output"

module Vagrant
  module Spec
    # Tests that box add worked with details
    OutputTester[:box_added_detailed] = lambda do |text, name, version, provider|
      text =~ /Successfully added box '#{name}' \(v#{version}\) for '#{provider}'/
    end

    # Tests that box add failed with a bad provider
    OutputTester[:box_add_wrong_provider] = lambda do |text|
      text =~ /doesn't match the provider/
    end

    # Tests that box list has a certain box
    OutputTester[:box_list_added] = lambda do |text, name|
      text =~ /Successfully added box '#{name}'/
    end

    # Tests that box list has no boxes.
    OutputTester[:box_list_no_boxes] = lambda do |text|
      text =~ /There are no installed boxes/
    end

    # Tests that box list has a certain box
    OutputTester[:box_list_box] = lambda do |text, name|
      text =~ /^#{name}\s+/
    end

    # Tests that box is outdated
    OutputTester[:box_outdated] = lambda do |text, name, provider, old_v, new_v|
      text =~ /'#{name}' for '#{provider}' is outdated! Current: #{old_v}\. Latest: #{new_v}/
    end

    # Tests that box is up to date
    OutputTester[:box_outdated_current] = lambda do |text, name|
      (text !~ /'#{name}' is outdated/) &&
        (text =~ /'#{name}'.+is up to date/)
    end
  end
end

Version data entries

70 entries across 21 versions & 1 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/output/box_output.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/output/box_output.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-03d88fe24677/acceptance/output/box_output.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.6.0/bundler/gems/vagrant-spec-abfc34474d12/acceptance/output/box_output.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-148cb63d6d06/acceptance/output/box_output.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/output/box_output.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-abfc34474d12/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-148cb63d6d06/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-abfc34474d12/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.6.0/bundler/gems/vagrant-spec-abfc34474d12/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-03d88fe24677/acceptance/output/box_output.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/output/box_output.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/output/box_output.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/output/box_output.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/output/box_output.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-148cb63d6d06/acceptance/output/box_output.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.6.0/bundler/gems/vagrant-spec-abfc34474d12/acceptance/output/box_output.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-abfc34474d12/acceptance/output/box_output.rb