Inspired by Railscasts #124 "Beta Invitations" (http://railscasts.com/episodes/124-beta-invitations) I created a small invitation system. The episode doesn''t cover testing, so I''ve made some tests for the Mailer responsible for sending the invitations. The test looks like this: def test_invitation invitation = Invitation.create(:sender => users(:admin), :recipient_email => "some_invited-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org") signup_url = "???" mail = InvitationMailer.create_invitation(invitation, signup_url) assert_equal "Invitation: Join Fountain CMS site", mail.subject assert_equal invitation.recipient_email, mail.to.first assert_equal "invitation-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org", mail.from.first expected_body = "You were invited to join Fountain CMS site.\n#{signup_url}\n" assert_equal expected_body, mail.body invitation.destroy end The test passes but as you can see, the local variable "signup_url" is set to "???". That basically means that I don''t know how to access my routes outside the controllers and views. How is that done? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---