Sha256: 3a58a571d4ba9a03dbf1308f04e0c29012595e7fd2215ac247ef7cc9b88a3633

Contents?: true

Size: 683 Bytes

Versions: 75

Compression:

Stored size: 683 Bytes

Contents

gem 'rspec-rails', '>= 2.0.0.beta.19', :group => [:development, :test]

stategies << lambda do
  generate 'rspec:install'

  spec_helper_path = 'spec/spec_helper.rb'

  gsub_file spec_helper_path, 'config.fixture_path = "#{::Rails.root}/spec/fixtures"', ''
  gsub_file spec_helper_path, /(config.use_transactional_fixtures = true)/, '# \1'

  if recipes.include? 'mongoid'
    mongoid_rspec_truncation = <<-MONGOID

      config.before :each do
        Mongoid.master.collections.select {|c| c.name !~ /system/ }.each(&:drop)
      end

    MONGOID

    inject_into_file spec_helper_path, mongoid_rspec_truncation, :after => "# config.use_transactional_fixtures = true\n"
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
wheels-0.1.30 lib/generators/recipes/rspec.rb
wheels-0.1.28 lib/generators/recipes/rspec.rb
wheels-0.1.27 lib/generators/recipes/rspec.rb
wheels-0.1.25 lib/generators/recipes/rspec.rb
wheels-0.1.24 lib/generators/recipes/rspec.rb
wheels-0.1.23 lib/generators/recipes/rspec.rb
wheels-0.1.22 lib/generators/recipes/rspec.rb
wheels-0.1.21 lib/generators/recipes/rspec.rb
wheels-0.1.20 lib/generators/recipes/rspec.rb
wheels-0.1.19 lib/generators/recipes/rspec.rb
wheels-0.1.18 lib/generators/recipes/rspec.rb
wheels-0.1.17 lib/generators/recipes/rspec.rb
wheels-0.1.16 lib/generators/recipes/rspec.rb
wheels-0.1.15 lib/generators/recipes/rspec.rb
wheels-0.1.14 lib/generators/recipes/rspec.rb
wheels-0.1.13 lib/generators/recipes/rspec.rb
wheels-0.1.12 lib/generators/recipes/rspec.rb
wheels-0.1.11 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.10 lib/generators/recipes/rspec.rb
wheels-0.1.9 lib/generators/recipes/rspec.rb