Sha256: 07f1787359e72d708d865c92aed0c822e220952dec59081d88871bdf5aeec0b1

Contents?: true

Size: 697 Bytes

Versions: 1

Compression:

Stored size: 697 Bytes

Contents

require 'spec_helper'

describe GitWakaTime::Cli do
  before do
    ENV['waka_log'] = 'true'
    stub_request(:get, /wakatime\.com/)
      .with(query: hash_including(:date))
      .to_return(body: File.read('./spec/fixtures/heartbeats.json'), status: 200)

    expect(YAML).to receive(:load_file).with(File.expand_path('~/.wakatime.yml')).and_return(YAML.load_file('./spec/fixtures/wakatime.yml'))
  end

  after do
    ENV['waka_log'] = 'false'
  end

  it 'should be able to be called' do
    ARGV.replace %w(tally --start_on 2012-01-01 --file) << @wdir.to_s
    expect { GitWakaTime::Cli.start }.to output.to_stdout
    # puts GitWakaTime::Cli.start('tally', "--file #{@wdir.to_s}")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitwakatime-0.4.0 spec/cli_spec.rb