I am reading " Agile Web Developement with rails". I am using Ruby 1.9.3
and Rails 3.2.16.
When I run rake test
command, i got following errors:
-
Failure:
test_received(OrderNotifierTest)
[/home/jaimin/rails3/work/depot/test/functional/order_notifier_test.rb:9]:
Expected /1 x Programming Ruby 1.9/ to match “Dear Dave
Thomas\r\n\r\nThank you for your recent order from The Pragmatic
Store.\r\n\r\nYou ordered the following items:\r\n\r\n 1 x Programming
Ruby 1.9\r\n\r\n\r\n\r\nWe’ll send you a separate e-mail when your order
ships.\r\n\r\n”. -
Failure:
test_shipped(OrderNotifierTest)
[/home/jaimin/rails3/work/depot/test/functional/order_notifier_test.rb:17]:
Expected /1 x Programming Ruby 1.9/ to match “Pragmatic Order
\r\n
Shipped\r\n This is just to let you know that we’ve shipped
\r\n
your recent order:\r\n\r\n
\r\n\r\n”.<th \r\n 1 x Programming
colspan=“2”>QtyDescription
Ruby 1.9\r\n\r\n\r\n
I refer this link:
http://stackoverflow.com/questions/17421097/rake-test-fail-assert-match
also but I can’t able to solve this error.
I have attached order_notifier_test.rb, Please find it.
my shipped.text.erb is under app/views/order_notifier directory.
How can I solve this error?
Kind regards.