Class | GenSpec::GeneratorExampleGroup |
In: |
lib/genspec/generator_example_group.rb
|
Parent: | Object |
generator_arguments | -> | generator_args |
with_arguments | -> | with_args |
# File lib/genspec/generator_example_group.rb, line 9 def generator_arguments @generator_args.dup? || [] end
# File lib/genspec/generator_example_group.rb, line 13 def generator_options @generator_options.dup? || {} end
# File lib/genspec/generator_example_group.rb, line 17 def with_arguments(*args, &block) if block_given? context "with arguments #{args.inspect}" do with_arguments(*args) instance_eval(&block) end else @generator_args = args.flatten.collect { |c| c.to_s } end end
# File lib/genspec/generator_example_group.rb, line 28 def with_options(hash, &block) if block_given? context "with options #{hash.inspect}" do with_options(hash) instance_eval(&block) end else @generator_options = hash end end