stevehodgkiss / generator_spec

Test Rails generators with RSpec
MIT License
111 stars 22 forks source link

Avoid errors when using do/end #43

Closed dgmora closed 7 years ago

dgmora commented 7 years ago

I've been bitten by this and I bet that other people too. If you use do/end instead of {} (which is more usual in multi-line blocks), the test will always pass, whatever you add, because no block is being passed to have_structure (to is taking it I think).

I see the gem is not very active, but it seems the most convenient way to test generators, so it'd be nice to have this merged!

stevehodgkiss commented 7 years ago

Released in 0.9.4, thanks! :)