Sha256: 662473de8d1045801b326d4d3fa98eaf8517333a47840f9143c96f2d1639a93e

Contents?: true

Size: 976 Bytes

Versions: 135

Compression:

Stored size: 976 Bytes

Contents

describe :time_gm, :shared => true do
  ruby_version_is ""..."1.9" do
    it "creates a time based on given values, interpreted as UTC (GMT)" do
      Time.send(@method, 2000,"jan",1,20,15,1).inspect.should == "Sat Jan 01 20:15:01 UTC 2000"
    end

    it "creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)" do
      time = Time.send(@method, 1, 15, 20, 1, 1, 2000, :ignored, :ignored, :ignored, :ignored)
      time.inspect.should == "Sat Jan 01 20:15:01 UTC 2000"
    end
  end

  ruby_version_is "1.9" do
    it "creates a time based on given values, interpreted as UTC (GMT)" do
      Time.send(@method, 2000,"jan",1,20,15,1).inspect.should == "2000-01-01 20:15:01 UTC"
    end

    it "creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)" do
      time = Time.send(@method, 1, 15, 20, 1, 1, 2000, :ignored, :ignored, :ignored, :ignored)
      time.inspect.should == "2000-01-01 20:15:01 UTC"
    end
  end
end

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-7.5.1 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-7.4.1 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-7.1.17 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-6.2.0 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-6.0.11 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.18 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.17 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.15 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.0.22 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.2 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.0.7 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.0.3 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-5.5.0 spec/framework_spec/app/spec/core/time/shared/gm.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/core/time/shared/gm.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/core/time/shared/gm.rb
tauplatform-1.0.1 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-3.5.1.12 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-3.3.5 spec/framework_spec/app/spec/core/time/shared/gm.rb
rhodes-3.4.2 spec/framework_spec/app/spec/core/time/shared/gm.rb