Sha256: cc9ef0a8ba3237d30589521defc9aab35ea9db27026e85623b04f09b93dd5b5a

Contents?: true

Size: 573 Bytes

Versions: 2

Compression:

Stored size: 573 Bytes

Contents

recipe :rspec do
  description 'This will add Rspec testing library into your app instead of Test::Unit'
  after :thinking_sphinx
  
  ask "Would you like to use Rspec in this project?" do
    gem 'rspec-rails'
    generate "rspec:install"
    remove_dir "test"
    
    inject_into_file "config/application.rb", :after => "class Application < Rails::Application\n" do
      <<-CONTENT.gsub(/^ {8}/, '')
        config.generators do |g|
          g.test_framework :rspec
        end
      CONTENT
    end

    # TODO: copy helpers etc
    # TODO: factory_girl etc
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
playmo-0.1.1 lib/playmo/recipes/rspec_recipe.rb
playmo-0.1.0 lib/playmo/recipes/rspec_recipe.rb