Sha256: 5bfdc5ec6859c90f33f97821b76d6a2d91a51afdf9328ffb342f091ca299cbc8
Contents?: true
Size: 586 Bytes
Versions: 13
Compression:
Stored size: 586 Bytes
Contents
require 'generators/mini_test' module MiniTest module Generators class DecoratorGenerator < Base def self.source_root File.expand_path('../templates', __FILE__) 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
13 entries across 13 versions & 4 rubygems