Optimization of generated?

This pull request reorganizes the methods called in `generated?` to only load the data (calls to `lines`) in last resort.
Because I can't do a test to check that the data is loaded (the last one) with `fail`.
Also, if I use `fail` I get an error instead of a test failure.
I could use an empty string instead of `false`, would be cleaner?