Hello,
I have defined a custom time format which works in development but causes errors in my functional tests. Is this a Rails bug or something I am doing wrong?
Here's my custom time format, as per AWDWRv2, in environment.rb:
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!( :uk_full => '%d %B %Y' )
In my view template I call it like this:
<%= order.created_at.to_s :uk_full %>
This works perfectly when I look at it in my browser in development.
However, in my functional test where I just try to get the relevant screen and assert the response is ok, the test breaks with:
ActionView::TemplateError: wrong number of arguments (1 for 0) #{RAILS_ROOT}/app/views/orders/index.rhtml:4:in `to_s'
I have verified that the :uk_full is the problem by removing it from the relevant line, at which point the test runs fine.
Any ideas? I would greatly appreciate suggestions.
Thanks and regards, Andy Stewart