Sha256: 3a4dd33fbd071cfa15be13ac1d7e323ec4e09879647e2b0157b9d6835cc5e96c

Contents?: true

Size: 697 Bytes

Versions: 4

Compression:

Stored size: 697 Bytes

Contents

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

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

describe "jmonth plugin" do
  {
    '2007/01/01' => '睦月',
    '2007/02/01' => '如月',
    '2007/03/01' => '弥生',
    '2007/04/01' => '卯月',
    '2007/05/01' => '皐月',
    '2007/06/01' => '水無月',
    '2007/07/01' => '文月',
    '2007/08/01' => '葉月',
    '2007/09/01' => '長月',
    '2007/10/01' => '神無月',
    '2007/11/01' => '霜月',
    '2007/12/01' => '師走'
  }.each do |k,v|
    it { setup_jmonth_plugin(Time.parse(k)).date.strftime('%i').should == v }
  end

  def setup_jmonth_plugin(date)
    fake_plugin(:jmonth) { |plugin| plugin.date = date }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tdiary-contrib-4.0.2.1 spec/jmonth_spec.rb
tdiary-contrib-4.0.2 spec/jmonth_spec.rb
tdiary-contrib-3.2.2.20130614 spec/jmonth_spec.rb
tdiary-contrib-3.2.2.20130518 spec/jmonth_spec.rb