Sha256: ff52b3345517e553c91e2e21aa98b805e275564505a5ad6e4f915a26c2177bab

Contents?: true

Size: 977 Bytes

Versions: 5

Compression:

Stored size: 977 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).ascend{|d| h=d+'spec_helper.rb'; break h if h.file?}

require 'admin_module/cli'

describe 'admin_module executable' do

  let(:cli) { AdminModule::CLI }

  it "returns help info" do
    output = capture_output do
      cli.start %w(help)
    end

    expect( output ).to include "help [COMMAND]"
    expect( output ).to include "gdl [COMMAND]"
    expect( output ).to include "config [COMMAND]"
    expect( output ).to include "ruleset [COMMAND]"
    expect( output ).to include "rule [COMMAND]"
  end

=begin
  it "returns non-zero exit status when passed unrecognized options" do
    pending
    #admin_module '--invalid_argument', :exitstatus => true
    admin_module '--invalid_argument'
    expect(exitstatus).to_not be_zero
  end

  it "returns non-zero exit status when passed unrecognized task" do
    pending
    admin_module 'unrecognized-task'#, :exitstatus => true
    expect(exitstatus).to_not be_zero
  end
=end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
admin_module-0.1.8 spec/lib/admin_module/cli_spec.rb
admin_module-0.1.7 spec/lib/admin_module/cli_spec.rb
admin_module-0.1.6 spec/lib/admin_module/cli_spec.rb
admin_module-0.1.5 spec/lib/admin_module/cli_spec.rb
admin_module-0.1.4 spec/lib/admin_module/cli_spec.rb