Sha256: de04b276dfaa782fac1190b4c844a8ae9bfd6ae1c6696d45432962ae7995ee6a

Contents?: true

Size: 701 Bytes

Versions: 5

Compression:

Stored size: 701 Bytes

Contents

run 'rails generate rspec:install'

# Specify rspec for generators
gsub_file 'config/application.rb', /.*config\.generators\.test_framework = false/, '    # config.generators.test_framework = false'

# MongoID Teardown
gsub_file 'spec/spec_helper.rb', /config\.fixture_path/, '# config.fixture_path'
gsub_file 'spec/spec_helper.rb', /config\.use_transactional_fixtures/, '# config.use_transactional_fixtures'
gsub_file 'spec/spec_helper.rb', /end/ do
<<-RUBY

  # Clean up the database
  require 'database_cleaner'
  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.orm = "mongoid"
  end
  config.before(:each) do
    DatabaseCleaner.clean
  end
  
end
RUBY
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
icebreaker-0.2.0 templates/test_suite.rb
icebreaker-0.1.9 templates/test_suite.rb
icebreaker-0.1.8 templates/test_suite.rb
icebreaker-0.1.7 templates/test_suite.rb
icebreaker-0.1.6 templates/test_suite.rb