Sha256: b3b390ff96fac0603967c0962e8672b2162924a4dece56358924a8ad77244c82
Contents?: true
Size: 758 Bytes
Versions: 3
Compression:
Stored size: 758 Bytes
Contents
require 'spec_helper' describe 'description' do let (:git) { Git.open(@wdir) } before do stub_request(:get, 'https://wakatime.com/api/v1/actions') .with(query: hash_including(:start, :end)) .to_return(body: File.read('./spec/fixtures/actions.json'), status: 200) end it 'can be run on dummy' do GitWakaTime.config.git = git GitWakaTime::Mapper.new(start_at: Date.new(2015, 1, 24)) actions = GitWakaTime::Query.new(GitWakaTime::Commit.all, File.basename(@wdir)).get timer = GitWakaTime::Timer.new(GitWakaTime::Commit.all, actions, File.basename(@wdir)).process # # UTC breaks actions of 1 day # expect(timer.size).to eq 1 # With 8 relevant commits expect(timer[timer.keys.first].size).to eq 8 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gitwakatime-0.1.2 | spec/timer_spec.rb |
gitwakatime-0.1.1 | spec/timer_spec.rb |
gitwakatime-0.1.0 | spec/timer_spec.rb |