Sha256: dd23f324d167e19f7103a6bbacbb2e2c583ab969a3069f117668949688a71ec5
Contents?: true
Size: 647 Bytes
Versions: 3
Compression:
Stored size: 647 Bytes
Contents
module TestUnit class DecoratorGenerator < ::Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) TEST_ROOT = 'test/decorators/' APPLICATION_DECORATOR_TEST = 'application_decorator_test.rb' APPLICATION_DECORATOR_TEST_PATH = TEST_ROOT + APPLICATION_DECORATOR_TEST def build_model_and_application_decorator_tests empty_directory TEST_ROOT unless File.exists?(APPLICATION_DECORATOR_TEST_PATH) template APPLICATION_DECORATOR_TEST, APPLICATION_DECORATOR_TEST_PATH end template 'decorator_test.rb', "#{TEST_ROOT}#{singular_name}_decorator_test.rb" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
draper-0.9.5 | lib/generators/test_unit/decorator_generator.rb |
draper-0.9.3 | lib/generators/test_unit/decorator_generator.rb |
draper-0.9.2 | lib/generators/test_unit/decorator_generator.rb |