Rails::Generators::Testing::Behavior::ClassMethods (original) (raw)

Methods

A

D

T

Instance Public methods

Sets default arguments on generator invocation. This can be overwritten when invoking it.

arguments %w(app_name --skip-active-record)

Source: show | on GitHub

def arguments(array) self.default_arguments = array end

Sets the destination of generator files:

destination File.expand_path("../tmp", __dir__)

Source: show | on GitHub

def destination(path) self.destination_root = path end

Sets which generator should be tested:

tests AppGenerator

Source: show | on GitHub

def tests(klass) self.generator_class = klass end