diff --git a/app/models/block.rb b/app/models/block.rb index 7140b89..012743f 100644 --- a/app/models/block.rb +++ b/app/models/block.rb @@ -2,6 +2,10 @@ class Block < ActiveRecord::Base acts_as_list :scope => :box belongs_to :box + def self.description + _('A dummy block.') + end + def content(main_content = nil) "This is block number %d" % self.id end diff --git a/test/unit/block_test.rb b/test/unit/block_test.rb new file mode 100644 index 0000000..d628211 --- /dev/null +++ b/test/unit/block_test.rb @@ -0,0 +1,9 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class BlockTest < Test::Unit::TestCase + + should 'describe itself' do + assert_kind_of String, Block.description + end + +end diff --git a/test/unit/main_block_test.rb b/test/unit/main_block_test.rb new file mode 100644 index 0000000..4e532b5 --- /dev/null +++ b/test/unit/main_block_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class MainBlockTest < Test::Unit::TestCase + + should 'describe itself' do + assert_kind_of String, MainBlock.description + assert_not_equal Block.description, MainBlock.description + end + +end -- libgit2 0.21.2