From 9dd0b8b27bc7072c7e6afe54ff3693f653b7c90c Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 8 Nov 2012 16:18:25 +0000 Subject: Make error message expectation slightly less specific - message format is slightly different under ruby 1.9. --- spec/models/application_mailer_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'spec/models') diff --git a/spec/models/application_mailer_spec.rb b/spec/models/application_mailer_spec.rb index a90f79c01..acf5f43bc 100644 --- a/spec/models/application_mailer_spec.rb +++ b/spec/models/application_mailer_spec.rb @@ -80,7 +80,8 @@ describe ApplicationMailer do it 'should raise an error if the template is in neither core nor theme' do prepend_theme_views('theme_one') - lambda{ ApplicationMailer.create_neither() }.should raise_error('Missing template application_mailer/neither.erb in view path spec/fixtures/theme_views/theme_one:spec/fixtures/theme_views/core') + expected_error = 'Missing template application_mailer/neither.erb in view path' + lambda{ ApplicationMailer.create_neither() }.should raise_error(/#{expected_error}/) end it 'should render a multipart email using a theme template' do @@ -125,7 +126,8 @@ describe ApplicationMailer do it 'should raise an error if the template is in neither core nor theme' do append_theme_views('theme_one') - lambda{ ApplicationMailer.create_neither() }.should raise_error('Missing template application_mailer/neither.erb in view path spec/fixtures/theme_views/core:spec/fixtures/theme_views/theme_one') + expected_error = 'Missing template application_mailer/neither.erb in view path' + lambda{ ApplicationMailer.create_neither() }.should raise_error(/#{expected_error}/) end it 'should render a multipart email using a core template' do -- cgit v1.2.3