-
Hartley McGuire authored
This require was added in cfcea1d5, but at that time the generated Gemfile did not resolve using the gemspec. gemspec was added to the plugin's generated Gemfile later in a74e4736. Since then, the Bundler.require in the plugin's generated config/application.rb will require the plugin and the extra require is unneeded. The replaced test was added in adfa417f when the plugin generator's application.rb was replaced with the app generator's. Since the test is only concerned with the file content and not whether that content is useful, the test was replaced with an attempt to run the plugin's test, since this would verify that the plugin can be loaded within the dummy app. The plugin helpers are added because the generated Gemfile is now used for resolution instead of Rails'. This makes the tests more accurate because real plugins will be resolving against their own Gemfiles. However, this also leads to a few issues solved by the new helpers: - gemspecs are generated with TODOs that have to be fixed - commands run in the plugin must have their Bundler environment reset because processes spawned in Rails' tests inherit BUNDLE_GEMFILE Co-authored-by:
Jonathan Hefner <jonathan@hefner.pro>
Hartley McGuire authoredThis require was added in cfcea1d5, but at that time the generated Gemfile did not resolve using the gemspec. gemspec was added to the plugin's generated Gemfile later in a74e4736. Since then, the Bundler.require in the plugin's generated config/application.rb will require the plugin and the extra require is unneeded. The replaced test was added in adfa417f when the plugin generator's application.rb was replaced with the app generator's. Since the test is only concerned with the file content and not whether that content is useful, the test was replaced with an attempt to run the plugin's test, since this would verify that the plugin can be loaded within the dummy app. The plugin helpers are added because the generated Gemfile is now used for resolution instead of Rails'. This makes the tests more accurate because real plugins will be resolving against their own Gemfiles. However, this also leads to a few issues solved by the new helpers: - gemspecs are generated with TODOs that have to be fixed - commands run in the plugin must have their Bundler environment reset because processes spawned in Rails' tests inherit BUNDLE_GEMFILE Co-authored-by:
Jonathan Hefner <jonathan@hefner.pro>
Loading