1
$:.unshift(File.dirname(__FILE__))
5
describe "jyear plugin" do
6
with_fixtures :date => :jyear do
7
def setup_jyear_plugin(date)
8
fake_plugin(:jyear) { |plugin|
13
it 'in :date' do |date, jyear|
14
setup_jyear_plugin(date).date.strftime('%K').should == jyear
18
:date => lambda {|val| Time.parse(val) },
22
['1925/01/01' => '昔々'],
23
['1926/12/25' => '昭和元年'],
24
['1927/01/01' => '昭和2' ],
25
['1989/01/08' => '平成元年' ],
26
['1990/01/01' => '平成2' ],