Commit ddc0af1125942de2d425e6833cddee40f0f37673

Authored by Joenio Costa
1 parent 932d74f8

Fixing unit test broken by commit 'c1fc02'

test/test_helper.rb
... ... @@ -209,6 +209,10 @@ module NoosferoTestHelper
209 209 def options_for_select(collection)
210 210 collection.map{|item| "<option value='#{item[1]}'>#{item[0]}</option>"}.join("\n")
211 211 end
  212 +
  213 + def params
  214 + {}
  215 + end
212 216 end
213 217  
214 218 class ActionController::IntegrationTest
... ...
test/unit/article_block_test.rb
... ... @@ -89,7 +89,7 @@ class ArticleBlockTest &lt; Test::Unit::TestCase
89 89 block.expects(:title).returns('')
90 90 block.stubs(:article).returns(article)
91 91  
92   - assert_equal "<h3></h3>Article content", instance_eval(&block.content)
  92 + assert_equal "<h3><span></span></h3>Article content", instance_eval(&block.content)
93 93 end
94 94  
95 95 should "display title if defined" do
... ... @@ -99,7 +99,7 @@ class ArticleBlockTest &lt; Test::Unit::TestCase
99 99 block.expects(:title).returns('Article title')
100 100 block.stubs(:article).returns(article)
101 101  
102   - assert_equal "<h3>Article title</h3>Article content", instance_eval(&block.content)
  102 + assert_equal "<h3><span>Article title</span></h3>Article content", instance_eval(&block.content)
103 103 end
104 104  
105 105 should 'display image if article is an image' do
... ... @@ -142,17 +142,6 @@ class ArticleBlockTest &lt; Test::Unit::TestCase
142 142 end
143 143  
144 144 protected
  145 + include NoosferoTestHelper
145 146  
146   - def content_tag(tag, text, options = {})
147   - "<#{tag}>#{text}</#{tag}>"
148   - end
149   - def image_tag(arg)
150   - arg
151   - end
152   - def link_to(text, url, options = {})
153   - "<a href='#{url.to_s}'>#{text}</a>"
154   - end
155   - def params
156   - {}
157   - end
158 147 end
... ...