Sha256: 67cd0d0f36d19d96e9909ec269e10d35d6c7db87bb72ebf7b802e8c15ac9fd3e

Contents?: true

Size: 497 Bytes

Versions: 48

Compression:

Stored size: 497 Bytes

Contents

# -*- coding: utf-8 -*-

$:.unshift(File.dirname(__FILE__))
require 'spec_helper'
require 'time'

describe "jyear plugin" do
  {
    '1925/01/01' => '昔々',
    '1926/12/25' => '昭和元年',
    '1927/01/01' => '昭和2',
    '1989/01/08' => '平成元年',
    '1990/01/01' => '平成2',
  }.each do |k,v|
    it { expect(setup_jyear_plugin(Time.parse(k)).date.strftime('%K')).to eq(v) }
  end

  def setup_jyear_plugin(date)
    fake_plugin(:jyear) { |plugin| plugin.date = date }
  end
end

Version data entries

48 entries across 42 versions & 2 rubygems

Version Path
tdiary-contrib-5.3.0 spec/jyear_spec.rb
tdiary-contrib-5.2.4 spec/jyear_spec.rb
tdiary-contrib-5.2.3 spec/jyear_spec.rb
tdiary-contrib-5.2.2 spec/jyear_spec.rb
tdiary-contrib-5.2.1 spec/jyear_spec.rb
tdiary-contrib-5.2.0 spec/jyear_spec.rb
tdiary-contrib-5.1.7 spec/jyear_spec.rb
tdiary-contrib-5.1.6 spec/jyear_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/spec/jyear_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-contrib-d1e41204db13/spec/jyear_spec.rb
tdiary-contrib-5.1.5 spec/jyear_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/spec/jyear_spec.rb
tdiary-contrib-5.1.4 spec/jyear_spec.rb
tdiary-contrib-5.1.3 spec/jyear_spec.rb
tdiary-contrib-5.1.2 spec/jyear_spec.rb
tdiary-contrib-5.1.1 spec/jyear_spec.rb
tdiary-contrib-5.1.0 spec/jyear_spec.rb
tdiary-contrib-5.0.13 spec/jyear_spec.rb
tdiary-contrib-5.0.12 spec/jyear_spec.rb
tdiary-contrib-5.0.11 spec/jyear_spec.rb