Improving generator controller code

By switching to it_behaves_like, the rspec failures are more friendly
for troubleshooting.

[skip ci]
Merge pull request #235 from ndlib/fixing-generator-for-better-clarity

Improving generator controller code