Rails::Generators::Testing::Behaviour::ClassMethods
Methods
A
D
T
Instance Public methods
arguments(array)

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

arguments %w(app_name --skip-active-record)
# File railties/lib/rails/generators/testing/behaviour.rb, line 37
def arguments(array)
  self.default_arguments = array
end
destination(path)

Sets the destination of generator files:

destination File.expand_path("../tmp", File.dirname(__FILE__))
# File railties/lib/rails/generators/testing/behaviour.rb, line 44
def destination(path)
  self.destination_root = path
end
tests(klass)

Sets which generator should be tested:

tests AppGenerator
# File railties/lib/rails/generators/testing/behaviour.rb, line 29
def tests(klass)
  self.generator_class = klass
end