lib/rubigen/helpers/generator_test_helper.rb
# asserts that the given module source file was generated.
# It takes a path without the <tt>.rb</tt> part.
# the contents of the class source file is passed to a block.
asserts that the given module source file was generated.
It takes a path without the .rb part.
the contents of the class source file is passed to a block.
asserts that the given module source file was generated . It takes a path without the . rb part . the contents of the class source file is passed to a block .
def assert_generated_module(path)
      path=~/\/?(\w+)$/
      module_name=$1.camelize
      assert_generated_file("#{path}.rb") do |body|
        assert body=~/module #{module_name}/,"the file '#{path}.rb' should be a module"
        yield body if block_given?
      end
    end
def assert_generated_module ( path ) path =~ / \/ ?( \w +)$ / module_name = $1 . camelize assert_generated_file ( "#{path}.rb" ) do | body | assert body =~ / module  #{ module_name } / , "the file '#{path}.rb' should be a module" yield body if block_given? end end
asserts that the given module source file was generated.
asserts that the given module source file was generated .
path
<not_specific>