module Ammeter::RSpec::Rails::GeneratorExampleGroup::ClassMethods

def ensure_current_path

def ensure_current_path
  self.test_unit_test_case_delegate.send :ensure_current_path
end

def generator(given_args=self.default_arguments, config={})

def generator(given_args=self.default_arguments, config={})
  @generator ||= begin
    args, opts = Thor::Options.split(given_args)
    self.test_unit_test_case_delegate.generator(args, opts, config)
  end
end

def initialize_delegate

def initialize_delegate
  self.test_unit_test_case_delegate = ::Rails::Generators::TestCase.new 'pending'
  self.test_unit_test_case_delegate.class.tests(described_class)
  @generator = nil
end

def prepare_destination

def prepare_destination
  self.test_unit_test_case_delegate.send :prepare_destination
end

def run_generator(given_args=self.default_arguments, config={})

def run_generator(given_args=self.default_arguments, config={})
  OutputCapturer.capture(:stdout) { generator(given_args, config).invoke_all }
end