diff --git a/app/models/image_gallery.rb b/app/models/image_gallery.rb new file mode 100644 index 0000000..a24ccbc --- /dev/null +++ b/app/models/image_gallery.rb @@ -0,0 +1,11 @@ +class ImageGallery < Article + + def self.short_description + _('Image gallery') + end + + def self.description + _('A collection of photos, logos or other kinds of images.') + end + +end diff --git a/test/unit/image_gallery_test.rb b/test/unit/image_gallery_test.rb new file mode 100644 index 0000000..ed7dea0 --- /dev/null +++ b/test/unit/image_gallery_test.rb @@ -0,0 +1,19 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class ImageGalleryTest < Test::Unit::TestCase + + should 'be a type of article' do + assert_kind_of Article, ImageGallery.new + end + + should 'provide description' do + ImageGallery.stubs(:==).with(Article).returns(true) + assert_not_equal Article.description, ImageGallery.description + end + + should 'provide short description' do + ImageGallery.stubs(:==).with(Article).returns(true) + assert_not_equal Article.short_description, ImageGallery.short_description + end + +end -- libgit2 0.21.2