Sha256: 2342f09596a04f2d2263d718a5c63a484270e406abe6ac0bc5a37ded3cf71ef3

Contents?: true

Size: 1.19 KB

Versions: 83

Compression:

Stored size: 1.19 KB

Contents

describe :time_local, :shared => true do

  ruby_version_is ""..."1.9" do
    it "creates a time based on given values, interpreted in the local time zone" do
      with_timezone("PST", -8) do
        Time.send(@method, 2000,"jan",1,20,15,1).inspect.should == "Sat Jan 01 20:15:01 -0800 2000"
      end
    end

    it "creates a time based on given C-style gmtime arguments, interpreted in the local time zone" do
      with_timezone("PST", -8) do
        time = Time.send(@method, 1, 15, 20, 1, 1, 2000, :ignored, :ignored, :ignored, :ignored)
        time.inspect.should == "Sat Jan 01 20:15:01 -0800 2000"
      end
    end
  end

  ruby_version_is "1.9" do
    it "creates a time based on given values, interpreted in the local time zone" do
      with_timezone("PST", -8) do
        Time.send(@method, 2000,"jan",1,20,15,1).inspect.should == "2000-01-01 20:15:01 -0800"
      end
    end

    it "creates a time based on given C-style gmtime arguments, interpreted in the local time zone" do
      with_timezone("PST", -8) do
        time = Time.send(@method, 1, 15, 20, 1, 1, 2000, :ignored, :ignored, :ignored, :ignored)
        time.inspect.should == "2000-01-01 20:15:01 -0800"
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.0 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.2 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.0 spec/framework_spec/app/spec/core/time/shared/local.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/core/time/shared/local.rb