Sha256: 9bb9ac52b35afeab01c1ec8f0210741bcca451d04db9881049bc15c978c61c79

Contents?: true

Size: 1.4 KB

Versions: 5

Compression:

Stored size: 1.4 KB

Contents

require 'feature_helper'

describe "License Finder command line executable" do
  # As a developer
  # I want a command-line interface
  # So that I can manage my application's dependencies and licenses

  let(:developer) { LicenseFinder::TestingDSL::User.new }

  specify "reports unapproved dependencies" do
    developer.create_empty_project
    developer.execute_command("license_finder dependencies add unapproved_gem Whatever")

    developer.run_license_finder
    expect(developer).to be_receiving_exit_code(1)
    expect(developer).to be_seeing 'unapproved_gem'
  end

  specify "reports that all dependencies are approved" do
    developer.create_empty_project

    developer.run_license_finder
    expect(developer).to be_receiving_exit_code(0)
    expect(developer).to be_seeing 'All dependencies are approved for use'
  end

  specify "shows usage and subcommand help" do
    developer.create_empty_project

    developer.execute_command "license_finder help"
    expect(developer).to be_seeing 'license_finder help [COMMAND]'

    developer.execute_command "license_finder ignored_groups help add"
    expect(developer).to be_seeing 'license_finder ignored_groups add GROUP'
  end

  it "reports `license_finder`'s license is MIT" do
    developer.create_ruby_app # has license_finder as a dependency

    developer.run_license_finder
    expect(developer).to be_seeing_something_like /license_finder.*MIT/
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
license_finder-2.0.4 features/features/cli_spec.rb
license_finder-2.0.3 features/features/cli_spec.rb
license_finder-2.0.2 features/features/cli_spec.rb
license_finder-2.0.1 features/features/cli_spec.rb
license_finder-2.0.0 features/features/cli_spec.rb