Sha256: ba70a6bc36c2d252a75429ad5ecb851daa541a1f301d44a3eff341f5c09ab647

Contents?: true

Size: 667 Bytes

Versions: 18

Compression:

Stored size: 667 Bytes

Contents

require 'spec_helper'

describe Frodo::Properties::TimeOfDay do
  let(:subject) { Frodo::Properties::TimeOfDay.new('TimeOfDay', '16:00:00.000') }
  let(:new_time) { Time.strptime('14:32:00.000', '%H:%M:%S.%L') }

  it { expect(subject.type).to eq('Edm.TimeOfDay') }
  it { expect(subject.value).to eq(Time.parse('16:00:00.000')) }

  it { expect(subject.url_value).to eq("16:00:00.000")}

  it { expect {subject.value = 'bad'}.to raise_error(ArgumentError) }

  it { expect(lambda {
    subject.value = '14:32:00.000'
    subject.value
  }.call).to eq(new_time) }

  it { expect(lambda {
    subject.value = new_time
    subject.value
  }.call).to eq(new_time) }
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
frodo-0.12.8 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.7 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.6 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.5 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.4 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.2 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.1 spec/frodo/properties/time_of_day_spec.rb
frodo-0.12.0 spec/frodo/properties/time_of_day_spec.rb
frodo-0.11.0 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.8 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.7 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.6 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.5 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.4 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.3 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.2 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.1 spec/frodo/properties/time_of_day_spec.rb
frodo-0.10.0 spec/frodo/properties/time_of_day_spec.rb