Sha256: 71c19055e9cfca9b885cd9529044b58aabb7f86f222a816a51d46fc48f19d523
Contents?: true
Size: 791 Bytes
Versions: 18
Compression:
Stored size: 791 Bytes
Contents
require 'spec_helper' describe WorkingHours::DurationProxy do describe '#initialize' do it 'is constructed with a value' do proxy = WorkingHours::DurationProxy.new(42) expect(proxy.value).to eq(42) end end context 'proxy methods' do let(:proxy) { WorkingHours::DurationProxy.new(42) } WorkingHours::Duration::SUPPORTED_KINDS.each do |kind| singular = kind[0..-2] it "##{kind} returns a duration object" do duration = proxy.send(kind) expect(duration.value).to eq(42) expect(duration.kind).to eq(kind) end it "##{singular} returns a duration object" do duration = proxy.send(singular) expect(duration.value).to eq(42) expect(duration.kind).to eq(kind) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems