Sha256: abf7043ee29de50df194a49468a715805fc6bdfb810b9f746685df1837c7cce3

Contents?: true

Size: 784 Bytes

Versions: 17

Compression:

Stored size: 784 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'
include OpenEHR::AssumedLibraryTypes

describe Timezone do
  before(:each) do
    @timezone = Timezone.new('+0930')
  end

  it 'hour is 9' do
    @timezone.hour.should be 9
  end

  it 'minute is 30' do
    @timezone.minute.should be 30
  end

  it 'minutes is alias of minute' do
    @timezone.minutes.should be @timezone.minute
  end

  it 'hours is alias of hour' do
    @timezone.hours.should be @timezone.hour
  end

  it '+0930 as string' do
    @timezone.to_s.should == '+0930'
  end

  describe 'Z timezone' do
    before(:each) do
      @timezone = Timezone.new('Z')
    end

    it 'hour is 0' do
      @timezone.hour.should be 0
    end

    it 'minute is 0' do
      @timezone.minute.should be 0
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.7 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.6 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.5 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.4 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.3 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.2 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.1 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.2.0 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.6 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.5 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.4 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.3 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.2 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.1 spec/lib/openehr/assumed_library_types/timezone_spec.rb
openehr-1.1.0 spec/lib/openehr/assumed_library_types/timezone_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/assumed_library_types/timezone_spec.rb