Module: Rails::Generators::Testing::Behaviour::ClassMethods
Relationships & Source Files | |
Defined in: | railties/lib/rails/generators/testing/behaviour.rb |
Instance Method Summary
-
#arguments(array)
Sets default arguments on generator invocation.
-
#destination(path)
Sets the destination of generator files:
-
#tests(klass)
Sets which generator should be tested:
Instance Method Details
#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 35
def arguments(array) self.default_arguments = array end
#destination(path)
[ GitHub ]# File 'railties/lib/rails/generators/testing/behaviour.rb', line 42
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 27
def tests(klass) self.generator_class = klass end