Commit 4ef4564d
Changed files (2)
config
spec
services
handlers
config/routes.rb
@@ -1,4 +1,6 @@
Cake::Application.routes.draw do
+ default_url_options(Rails.application.config.action_mailer.default_url_options)
+
get "about_us" => "home#about_us"
get "why_cakeside" => "home#why_cakeside"
spec/services/handlers/publish_cake_to_twitter_spec.rb
@@ -18,7 +18,6 @@ describe PublishCakeToTwitter do
let(:id) { 88 }
before :each do
- Rails.application.routes.default_url_options[:host]= 'localhost:3000'
cake.stub(:user).and_return(artist)
cakes.stub(:find).with(id).and_return(cake)
end
@@ -31,7 +30,7 @@ describe PublishCakeToTwitter do
it "tweets new cakes" do
subject.handle(cake_id: id)
- twitter.should have_received(:tweet).with("yummy By joe on http://localhost:3000/creations/88-yummy!")
+ twitter.should have_received(:tweet).with("yummy By joe on http://www.blah.com/creations/88-yummy!")
end
end