Sha256: 52e653fcd3a30d6e2844241c98873fc1b68116e093147cd7e87f28f52bdea9e2

Contents?: true

Size: 917 Bytes

Versions: 29

Compression:

Stored size: 917 Bytes

Contents

ENV['RAILS_ENV'] ||= 'test'

require File.expand_path('../rails_app/config/environment.rb',  __FILE__)

require 'bundler'
Bundler.setup

require 'rspec'
require 'rspec/rails'
# require 'active_support/core_ext'
# require 'rails/test_help'

Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}

ActiveRecord::Migrator.migrate File.expand_path('../rails_app/db/migrate/', __FILE__)

Rspec.configure do |config|
  config.mock_with :mocha
  
  config.use_transactional_fixtures = true
end

# for removing plugins added in a test to make sure they don't bleed over
module Governor
  class PluginManager
    def self.remove_plugin(plugin_or_name)
      case plugin_or_name
      when Plugin then return @@plugins.delete(plugin_or_name)
      else # Plugin Name
        @@plugins.each do |plugin|
          return @@plugins.delete(plugin) if plugin.name == plugin_or_name
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
governor_tags-0.2.2 spec/spec_helper.rb
governor-0.5.7 spec/spec_helper.rb
governor-0.5.6 spec/spec_helper.rb
governor-0.5.5 spec/spec_helper.rb
governor_background-0.3.0 spec/spec_helper.rb
governor-0.5.4 spec/spec_helper.rb
governor_twitter-0.1.0 spec/spec_helper.rb
governor_background-0.2.2 spec/spec_helper.rb
governor_background-0.2.1 spec/spec_helper.rb
governor_background-0.2.0 spec/spec_helper.rb
governor-0.5.3 spec/spec_helper.rb
governor_tags-0.2.1 spec/spec_helper.rb
governor_tags-0.2.0 spec/spec_helper.rb
governor_tags-0.1.1 spec/spec_helper.rb
governor_tags-0.1.0 spec/spec_helper.rb
governor-0.5.2 spec/spec_helper.rb
governor-0.5.1 spec/spec_helper.rb
governor-0.5.0 spec/spec_helper.rb
governor-0.4.0 spec/spec_helper.rb
governor_livejournal-0.2.0 spec/spec_helper.rb