spec/generator_spec_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 generated_module?(path)
      path=~/\/?(\w+)$/
      module_name=$1.camelize
      generated_file?("#{path}.rb") do |body|
        it "should define #{module_name} in #{path}.rb" do
          body.should match(/module #{module_name}/)
        end
        yield body if block_given?
      end
    end
def generated_module? ( path ) path =~ / \/ ?( \w +)$ / module_name = $1 . camelize generated_file? ( "#{path}.rb" ) do | body | it "should define #{module_name} in #{path}.rb" do body . should match ( / module  #{ module_name } / ) end 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>