Sha256: 485539257506cc8f56a4a9886fb3277479136956f09909e1e32f6e19fd791f3c
Contents?: true
Size: 639 Bytes
Versions: 3
Compression:
Stored size: 639 Bytes
Contents
# frozen_string_literal: true 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
active_decorator-1.0.0 | test/configuration_test.rb |
active_decorator-0.9.0 | test/configuration_test.rb |
active_decorator-0.8.0 | test/configuration_test.rb |