diff --git a/test/test_helper.rb b/test/test_helper.rb index a8ecdb7..b16b4b1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -209,6 +209,10 @@ module NoosferoTestHelper def options_for_select(collection) collection.map{|item| ""}.join("\n") end + + def params + {} + end end class ActionController::IntegrationTest diff --git a/test/unit/article_block_test.rb b/test/unit/article_block_test.rb index bb24c54..3ef840b 100644 --- a/test/unit/article_block_test.rb +++ b/test/unit/article_block_test.rb @@ -89,7 +89,7 @@ class ArticleBlockTest < Test::Unit::TestCase block.expects(:title).returns('') block.stubs(:article).returns(article) - assert_equal "

Article content", instance_eval(&block.content) + assert_equal "

Article content", instance_eval(&block.content) end should "display title if defined" do @@ -99,7 +99,7 @@ class ArticleBlockTest < Test::Unit::TestCase block.expects(:title).returns('Article title') block.stubs(:article).returns(article) - assert_equal "

Article title

Article content", instance_eval(&block.content) + assert_equal "

Article title

Article content", instance_eval(&block.content) end should 'display image if article is an image' do @@ -142,17 +142,6 @@ class ArticleBlockTest < Test::Unit::TestCase end protected + include NoosferoTestHelper - def content_tag(tag, text, options = {}) - "<#{tag}>#{text}" - end - def image_tag(arg) - arg - end - def link_to(text, url, options = {}) - "#{text}" - end - def params - {} - end end -- libgit2 0.21.2