Home > ruby-rails > ERb’in "ActionMailer fixtures" Up

ERb’in "ActionMailer fixtures" Up

Tue Jun 16 2009 02:00:00 GMT+0200 (Central European Summer Time)

I don't know if my slightly outdated Rails 2.2.2 is the problem. But unlike in the fixtures for normal unit tests, I can't use ERb for my ActionMailers templates.

Add this method to your ActionMailer::TestCase to let ERb pre-process your fixtures:

def read_fixture(action) 
	a = super 
	template = ERB.new(a.join) 
	template.result(binding) 
end
Categories: ruby-rails
Comments are closed.