From 1d0e84f427a13509e5ebd0692d39f73bfb02bab4 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 3 Apr 2013 20:36:23 -0300 Subject: [PATCH] Fixing short html article test --- test/unit/article_test.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/unit/article_test.rb b/test/unit/article_test.rb index 735f17e..04dc03b 100644 --- a/test/unit/article_test.rb +++ b/test/unit/article_test.rb @@ -98,13 +98,8 @@ class ArticleTest < ActiveSupport::TestCase end should 'provide short html version' do - a = fast_create(Article, :body => 'full body', :abstract => 'lead') - a.stubs(:url).returns({:x=>'none'}) - a.stubs(:link_to).returns('') - def a.content_tag (tag, content, c=nil) - "<#{tag}>#{content}" - end - assert_match /
lead.*/, a.to_html(:format=>'short') + a = fast_create(Article, :body => 'full body', :abstract => 'lead', :profile_id => profile.id) + assert_match /lead/, a.to_html(:format=>'short') end should 'provide full html version' do -- libgit2 0.21.2