Sha256: 2afab463a0643ae8a2e2eed404b837d423f26fbee9751816cbf0f93b2c77bc95
Contents?: true
Size: 573 Bytes
Versions: 7
Compression:
Stored size: 573 Bytes
Contents
require 'generators/mini_test' module MiniTest module Generators class DecoratorGenerator < Base def self.source_root File.expand_path("templates", __dir__) end class_option :spec, type: :boolean, default: false, desc: "Use MiniTest::Spec DSL" check_class_collision suffix: "DecoratorTest" def create_test_file template_type = options[:spec] ? "spec" : "test" template "decorator_#{template_type}.rb", File.join("test/decorators", class_path, "#{singular_name}_decorator_test.rb") end end end end
Version data entries
7 entries across 7 versions & 1 rubygems