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
133 134 135 136 137 |
# File 'lib/generator_spec/matcher.rb', line 133 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 |