Module: GeneratorSpec::Matcher

Included in:
TestCase
Defined in:
lib/generator_spec/matcher.rb

Defined Under Namespace

Classes: Directory, File, Migration, Root

Instance Method Summary collapse

Instance Method Details

#have_structure(&block) ⇒ Object

Raises:

  • (RuntimeError)


165
166
167
168
169
# File 'lib/generator_spec/matcher.rb', line 165

def have_structure(&block)
  error = 'You must pass a block to have_structure (Use {} instead of do/end!)'
  raise RuntimeError, error unless block_given?
  Root.new(&block)
end