Sha256: 4d0f8c1ac1e3e146cb6617ee621cb9d908f201119a1e94a82a15454321e80352
Contents?: true
Size: 845 Bytes
Versions: 31
Compression:
Stored size: 845 Bytes
Contents
require 'spec_helper' describe Krikri::Activity do subject { described_class.new(agent_class.new) } let(:agent_class) { Class.new { extend Krikri::SoftwareAgent } } describe '#agent' do it 'has an agent' do expect(subject.agent).to be_a agent_class end end describe '#start_time' do before do subject.set_start_time end it 'marks start time' do expect(subject.start_time).to be_a DateTime end end describe 'end_time' do it 'raises an error if not started' do expect { subject.set_end_time }.to raise_error end context 'with start time' do before do subject.set_start_time subject.set_end_time end it 'marks end time' do subject.set_start_time expect(subject.end_time).to be_a DateTime end end end end
Version data entries
31 entries across 31 versions & 1 rubygems