Module: GeneratorSpec::GeneratorExampleGroup::ClassMethods
- Defined in:
- lib/generator_spec/generator_example_group.rb
Instance Method Summary collapse
-
#arguments(array) ⇒ Object
Sets default arguments on generator invocation.
-
#destination(path) ⇒ Object
Sets the destination of generator files:.
-
#tests(klass) ⇒ Object
Sets which generator should be tested:.
Instance Method Details
#arguments(array) ⇒ Object
Sets default arguments on generator invocation. This can be overwritten when invoking it.
arguments %w(app_name --skip-active-record)
43 44 45 |
# File 'lib/generator_spec/generator_example_group.rb', line 43 def arguments(array) self.default_arguments = array end |
#destination(path) ⇒ Object
51 52 53 |
# File 'lib/generator_spec/generator_example_group.rb', line 51 def destination(path) self.destination_root = path end |
#tests(klass) ⇒ Object
Sets which generator should be tested:
tests AppGenerator
34 35 36 |
# File 'lib/generator_spec/generator_example_group.rb', line 34 def tests(klass) self.generator_class = klass end |