Sha256: 9c80e93fb9c3beecc25a386360556be6e08a97e7a30fa9ad70e6d58d5af9dabb

Contents?: true

Size: 712 Bytes

Versions: 6

Compression:

Stored size: 712 Bytes

Contents

require 'spec_helper'

describe Pushpop::CLI do

  def start(str=nil)
    Pushpop::CLI.start(str ? str.split(" ") : [])
  end

  it 'prints help by default' do
    _, options = start
    expect(_).to be_empty
  end

  describe 'with -v' do
    it 'prints the version' do
      _, options = start('-v')
      expect(_).to match('Pushpop version')
    end
  end

  describe 'jobs:describe' do
    it 'prints job information' do
      _, options = start('jobs:describe --file spec/jobs')
      expect(_.name).to eq('Simple Math')
    end
  end

  describe 'jobs:run_once' do
    it 'runs jobs once' do
      _, options = start('jobs:run_once --file spec/jobs')
      expect(_.first).to equal(30)
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pushpop-0.4.0 spec/pushpop/cli_spec.rb
pushpop-0.3.3 spec/pushpop/cli_spec.rb
pushpop-0.3.2 spec/pushpop/cli_spec.rb
pushpop-0.3.1 spec/pushpop/cli_spec.rb
pushpop-0.2 spec/pushpop/cli_spec.rb
pushpop-0.1.2 spec/pushpop/cli_spec.rb