Sha256: fb2291e293ec1874e9cd819fff00f14a271293e765ebe063b124c4102fc60dff

Contents?: true

Size: 474 Bytes

Versions: 3

Compression:

Stored size: 474 Bytes

Contents

require File.expand_path('../../../shared/fixtures', __FILE__)
require 'jactive_support/java_ext/sql_date/localize'

setup_date_translations
describe "java::sql::Date#localize" do
  it "localizes sql date format" do
    date = java::sql::Date.new(1192140000000)
    date.localize.should == '12/10/2007'
  end

  it "localizes sql date with default date format" do
    date = java::sql::Date.new(1192140000000)
    date.localize(format: '').should == 'Oct 12, 2007'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jactive_support-3.0.0 spec/java_ext/sql_date/localize_spec.rb
jactive_support-3.0.0.pre2 spec/java_ext/sql_date/localize_spec.rb
jactive_support-3.0.0.pre1 spec/java_ext/sql_date/localize_spec.rb