Sha256: 1bcbc1ed25f2e88014012bb4d22ef0ed5ba84307a68484560a3366b4960595e7

Contents?: true

Size: 959 Bytes

Versions: 21

Compression:

Stored size: 959 Bytes

Contents

require "test_helper"

describe "bin/vanity" do

  before do
    not_collecting!
  end

  it "responds to version" do
    assert_output(nil) do
      proc {
        ARGV.clear
        ARGV << '--version'
        load "bin/vanity"
      }.must_raise SystemExit
    end
  end

  it "responds to help" do
    assert_output(nil) do
      proc {
        ARGV.clear
        ARGV << '--help'
        load "bin/vanity"
      }.must_raise SystemExit
    end
  end

  it "responds to list" do
    require "vanity/commands/list"
    Vanity::Commands.expects(:list)
    ARGV.clear
    ARGV << 'list'
    load "bin/vanity"
  end

  it "responds to report" do
    require "vanity/commands/report"
    Vanity::Commands.expects(:report)
    ARGV.clear
    ARGV << 'report'
    load "bin/vanity"
  end

  it "responds to unknown commands" do
    assert_output("No such command: upgrade\n") do
      ARGV.clear
      ARGV << 'upgrade'
      load "bin/vanity"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
vanity-3.1.0 test/cli_test.rb
vanity-3.0.2 test/cli_test.rb
vanity-3.0.1 test/cli_test.rb
vanity-3.0.0 test/cli_test.rb
vanity-2.2.10 test/cli_test.rb
vanity-2.2.9 test/cli_test.rb
vanity-2.2.8 test/cli_test.rb
vanity-2.2.7 test/cli_test.rb
vanity-2.2.6 test/cli_test.rb
vanity-2.2.4 test/cli_test.rb
vanity-2.2.3 test/cli_test.rb
vanity-2.2.2 test/cli_test.rb
vanity-2.2.1 test/cli_test.rb
vanity-2.2.0 test/cli_test.rb
vanity-2.1.2 test/cli_test.rb
vanity-2.1.1 test/cli_test.rb
vanity-2.1.0 test/cli_test.rb
vanity-2.0.1 test/cli_test.rb
vanity-2.0.0 test/cli_test.rb
vanity-2.0.0.beta9 test/cli_test.rb