lib/pluginizer/plugin_builder.rb in pluginizer-0.1.4 vs lib/pluginizer/plugin_builder.rb in pluginizer-0.1.5

- old
+ new

@@ -1,15 +1,7 @@ module Pluginizer class PluginBuilder < Rails::PluginBuilder - def readme - template 'README.md' - end - - def gemspec - template "%name%.gemspec" - end - def gitignore template '.gitignore' end def test @@ -52,19 +44,28 @@ "\n config.infer_rake_task_specs_from_file_location!\n", before: /^end/ insert_into_file rails_helper, "\n config.render_views\n", before: /^end/ + cache = <<-CACHE.strip_heredoc.indent(2) + + config.before(:each) do + Rails.cache.clear + end + CACHE + insert_into_file rails_helper, cache, + before: /^end/ shoulda = <<-SHOULDA.strip_heredoc.indent(2) Shoulda::Matchers.configure do |config| config.integrate do |with| with.test_framework :rspec with.library :rails end end SHOULDA - insert_into_file rails_helper, shoulda, before: /^end/ + insert_into_file rails_helper, shoulda, + before: /^end/ insert_into_file rails_helper, "\n config.include(Shoulda::Callback::Matchers::ActiveModel)\n", before: /^end/ end end