Sha256: 566f315e81ae1064c01016fa4bbcbc59e26c35d5d08979701c8b972d918256f3

Contents?: true

Size: 1.07 KB

Versions: 13

Compression:

Stored size: 1.07 KB

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'spec'
require 'spec/autorun'

Spec::Runner.configure do |config| end
# Tests for the cli
# I'm not quite sure what the most effective way to test this is...
describe "Ticketmaster CLI" do
  before(:all) do
    @ticket = File.dirname(__FILE__) + '/../bin/tm'
    @cli_dir = File.dirname(__FILE__) + '/../lib/ticketmaster/cli'
  end
  
  it "should output help if no command given" do
    help = `#{@ticket}`
    $?.should == 0
    help.should include('Usage: tm [options] COMMAND [command_options]')
  end
  
  it "should be able to show help pages" do
    `#{@ticket} help`.should include(File.read(@cli_dir + '/commands/help/help'))
    `#{@ticket} help config`.should include(File.read(@cli_dir + '/commands/help/config'))
    `#{@ticket} help console`.should include(File.read(@cli_dir + '/commands/help/console'))
  end
  
  it "should be able to add and edit config info" do
    pending
  end
  
  it "should be able to open up a console" do
    pending
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ticketmaster-0.4.8 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.7 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.6 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.5 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.3 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.2 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.1 spec/ticketmaster-cli_spec.rb
ticketmaster-0.4.0 spec/ticketmaster-cli_spec.rb
ticketmaster-0.3.10 spec/ticketmaster-cli_spec.rb
ticketmaster-0.3.9 spec/ticketmaster-cli_spec.rb
ticketmaster-0.3.8 spec/ticketmaster-cli_spec.rb
ticketmaster-0.3.7 spec/ticketmaster-cli_spec.rb
ticketmaster-0.3.6 spec/ticketmaster-cli_spec.rb