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.8 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.7 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.6 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.5 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.4 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.3 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.2 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.1 lib/generators/wheels/recipes/rspec.rb
wheels-0.1.0 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.49 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.48 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.47 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.46 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.45 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.44 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.43 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.42 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.41 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.40 lib/generators/wheels/recipes/rspec.rb
wheels-0.0.39 lib/generators/wheels/recipes/rspec.rb