Fixed plugin_generator test

Template replay needs to happen after bundle.

As we are doing TemplateRecording in apply_rails_template.

here are few commits for changes

8beb42cfbc41753ae4dbb91e16abcd1fb7d00356
9104702be61253f9448ca070a22fc86bb4299555
Merge pull request #12798 from arunagw/plugin-generators-test

Fixed plugin_generator test