Sha256: 984a42632393206c161a92ab5e6448b643b8e8f054e8b8db83c6628cfaa16ba5
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
module Playmo module Recipes class RspecRecipe < Playmo::Recipe source_root File.expand_path('../templates/rspec_recipe', __FILE__) def setup question "Would you like to use Rspec in this project?" => :install_rspec end protected def install_rspec gem 'rspec-rails' Event.events.listen(:after_install) do |event_data| generate "rspec:install" remove_dir "test" inject_into_file "config/application.rb", :after => "class Application < Rails::Application\n" do <<-CONTENT.gsub(/^ {10}/, '') config.generators do |g| g.test_framework :rspec end CONTENT end end # TODO: copy helpers etc # TODO: factory_girl etc end end end end # Write down this recipe to our Cookbook if it's available require File.dirname(__FILE__) + '/application_helper_recipe' Playmo::Cookbook.instance.insert_after(Playmo::Recipes::ApplicationHelperRecipe, Playmo::Recipes::RspecRecipe) if defined?(Playmo::Cookbook)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
playmo-0.0.17 | lib/playmo/recipes/rspec_recipe.rb |