Sha256: 4a8034547d18a6819fb332bb2239ec12fc43b53bd3e6b0c0d3ee77549f58f36e
Contents?: true
Size: 609 Bytes
Versions: 2
Compression:
Stored size: 609 Bytes
Contents
require 'test_helper' Comic = Struct.new(:title, :price) module ComicPresenter def price "$#{super}" end end class ConfigurationTest < Test::Unit::TestCase test 'with a custom decorator_suffix' do begin ActiveDecorator.configure do |config| config.decorator_suffix = 'Presenter' end comic = ActiveDecorator::Decorator.instance.decorate Comic.new("amatsuda's (Poignant) Guide to ActiveDecorator", 3) assert_equal '$3', comic.price ensure ActiveDecorator.configure do |config| config.decorator_suffix = 'Decorator' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_decorator-0.7.1 | test/configuration_test.rb |
active_decorator-0.7.0 | test/configuration_test.rb |