Module: GeneratorSpec::TestCase

Extended by:
ActiveSupport::Concern
Includes:
FileUtils, Matcher
Defined in:
lib/generator_spec/test_case.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Matcher

#have_structure

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_sym, *arguments, &block) ⇒ Object



37
38
39
# File 'lib/generator_spec/test_case.rb', line 37

def method_missing(method_sym, *arguments, &block)
  self.test_case_instance.send(method_sym, *arguments, &block)
end

Instance Method Details

#respond_to?(method_sym, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
44
45
46
47
# File 'lib/generator_spec/test_case.rb', line 41

def respond_to?(method_sym, include_private = false)
  if self.test_case_instance.respond_to?(method_sym)
    true
  else
    super
  end
end