Sha256: f2e0ed18346259ed97225cb8dcbb3f9db4ec3b14325103390b761ca6d7b0312a

Contents?: true

Size: 905 Bytes

Versions: 2

Compression:

Stored size: 905 Bytes

Contents

require "test_helper"

describe "bin/vanity" do

  it "responds to version" do
    proc {
      IO.any_instance.expects(:puts)
      ARGV.clear
      ARGV << '--version'
      load "bin/vanity"
    }.must_raise SystemExit
  end

  it "responds to help" do
    proc {
      IO.any_instance.expects(:puts)
      ARGV.clear
      ARGV << '--help'
      load "bin/vanity"
    }.must_raise SystemExit
  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

2 entries across 2 versions & 1 rubygems

Version Path
vanity-2.0.0.beta5 test/cli_test.rb
vanity-2.0.0.beta4 test/cli_test.rb