Skip to content
Extraits de code Groupes Projets
Valider a28a8615 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

fix url helpers on fakes

parent 8b3beba9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -37,6 +37,11 @@ class PostsFake
def id
@model.id
end
def to_s
@model.id.to_s
end
def person
@fakes_collection.people_hash[@model.person_id]
end
......
......@@ -30,6 +30,7 @@ describe PostsFake do
end
end
describe PostsFake::Fake do
include Rails.application.routes.url_helpers
before do
@post = mock()
@fakes = mock()
......@@ -48,6 +49,15 @@ describe PostsFake do
@post.should_receive(:text)
@fake.text
end
it 'works with url helpers' do
sm = Factory(:status_message)
fake = PostsFake::Fake.new(sm, @fakes)
puts status_message_path(fake)
status_message_path(fake).should == status_message_path(sm)
end
end
end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter