just a quick test to demonstrate the documentation was wrong (issue #377)

This commit is contained in:
Didier Lafforgue 2012-04-22 01:27:07 +02:00
parent 08cf381bc3
commit 57b7cc1ef2
2 changed files with 8 additions and 0 deletions

View File

@ -35,4 +35,10 @@ describe Locomotive::Liquid::Filters::Date do
format_date(@date).should == '06/29/2007'
end
it 'prints a date within a template (from the documentation)' do
template = Liquid::Template.parse("{{ today | localized_date: '%d %B', 'fr' }}")
context = Liquid::Context.new({}, { 'today' => @date }, {})
template.render(context).should == '29 juin'
end
end

View File

@ -47,6 +47,7 @@ describe Locomotive::Liquid::Filters::Resize do
end
context 'when no resize string is given' do
before :each do
@template = Liquid::Template.parse('{{ asset | resize: }}')
end
@ -54,6 +55,7 @@ describe Locomotive::Liquid::Filters::Resize do
it 'returns a liquid error' do
@template.render(@context).should include 'Liquid error: wrong number of arguments'
end
end
end
end