Class GenSpec::GeneratorExampleGroup
In: lib/genspec/generator_example_group.rb
Parent: Object

Methods

Included Modules

Spec::Example::ExampleMethods GenSpec::GenerationMatchers

External Aliases

generator_arguments -> generator_args
with_arguments -> with_args

Public Class methods

[Source]

# File lib/genspec/generator_example_group.rb, line 9
      def generator_arguments
        @generator_args.dup? || []
      end

[Source]

# File lib/genspec/generator_example_group.rb, line 13
      def generator_options
        @generator_options.dup? || {}
      end

[Source]

# 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

[Source]

# 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

Public Instance methods

[Source]

# File lib/genspec/generator_example_group.rb, line 43
    def subject(&block)
      block.nil? ?
        explicit_subject || implicit_subject : @explicit_subject_block = block
    end

[Validate]