Sha256: b6a156893b2aa7ebaa9ea98c557899f308f14131cc765efb7f5d82cc5ea6bea1

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

require 'spec_helper'

describe Time do
  describe "#internet" do
    context "outside DST" do
      context "for a fixed time in" do
        context "CET" do
          subject { Time.parse "Fri Nov 30 12:00:00 +0100 2012" }

          its(:beats) { should be 500 }
          its(:to_beats) { should eq "@500" }
        end

        context "UTC" do
          subject { Time.parse "Fri Nov 30 11:00:00 UTC 2012" }

          its(:beats) { should be 500 }
          its(:to_beats) { should eq "@500" }
        end

        context "another timezone" do
          subject { Time.parse "Fri Nov 30 06:00:00 EST 2001" }

          its(:beats) { should be 500 }
          its(:to_beats) { should eq "@500" }
        end
      end
    end

    context "during DST" do
      context "for a fixed time in" do
        context "CET" do
          subject { Time.parse "Tue Jul 24 12:00:00 +0100 2012" }

          its(:beats) { should be 500 }
          its(:to_beats) { should eq "@500" }
        end

        context "UTC" do
          subject { Time.parse "Tue Jul 24 11:00:00 UTC 2012" }

          its(:beats) { should be 500 }
          its(:to_beats) { should eq "@500" }
        end

        context "another timezone" do
          subject { Time.parse "Tue Jul 24 06:00:00 EST 2012" }

          its(:beats) { should be 500 }
          its(:to_beats) { should eq "@500" }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
internet_time-1.0.3 spec/internet_time_spec.rb
internet_time-1.0.2 spec/internet_time_spec.rb