From 61e8866b9a8ebeb8d6b19dcdfec0082161a073db Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Fri, 22 Feb 2008 23:04:45 +0000 Subject: [PATCH] ActionItem188: MainBlock#content should not be called never, but anyway it can't call something that does not exist --- app/models/main_block.rb | 2 +- test/unit/main_block_test.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/main_block.rb b/app/models/main_block.rb index 0d1a8a5..2ef71cb 100644 --- a/app/models/main_block.rb +++ b/app/models/main_block.rb @@ -5,7 +5,7 @@ class MainBlock < Block end def content - main_content + nil end def main? diff --git a/test/unit/main_block_test.rb b/test/unit/main_block_test.rb index 4e532b5..2bca388 100644 --- a/test/unit/main_block_test.rb +++ b/test/unit/main_block_test.rb @@ -7,4 +7,8 @@ class MainBlockTest < Test::Unit::TestCase assert_not_equal Block.description, MainBlock.description end + should 'have no content' do + ok("MainBlock must not have a content") { MainBlock.new.content.blank? } + end + end -- libgit2 0.21.2