I have specified default_url_options in my /test.rb environments with
config.action_mailer.default_url_options = { :host => "www.xyu.at" }
This is quite normal in my cucumber history, where I test user registration, the link to activate the user is generated correctly
invitation_activation_url(1)
=> "www.xyu.at/signup/1231hj23jh23"
But when I try to follow the link provided in the email with the following code in the / steps / user _steps.rb functions (using the email address-rspec from http://github.com/bmabey/email-spec/tree/master ) :
When /^I follow the invitation link$/ do
When 'I follow "'+invitation_activation_url(1) + '" in the email'
end
Here the URL is created using the default host:
invitation_activation_url(1)
=> "www.example.com/signup/1231hj23jh23"
Can someone help me? I do not understand what I am doing wrong ....
Thanks!
EDIT:
It looks like a method
current_url
but I donโt know where it came from ..?
EDIT:
, /support/env.rb
ENV["RAILS_ENV"] ||= "test"
EDIT:
- , edbond,
invitation_activation_url(1, :host => "www.xyz.at")
=> "www.xyz.at/signup/1231hj23jh23"
( / test.rb - )