Sha256: 7eaf80c7b077ee292196a3931ec2a40a880e96c2a8387608888c4953e7ec2c5f

Contents?: true

Size: 996 Bytes

Versions: 1

Compression:

Stored size: 996 Bytes

Contents

$:.reject! { |e| e.include? 'TextMate' }
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")

require 'test_help'
gem 'thoughtbot-factory_girl' # from github
require 'factory_girl'
require 'ruby-debug'
require 'mocha'
require 'redgreen' rescue LoadError
require File.expand_path(File.dirname(__FILE__) + '/factories')
class ActiveSupport::TestCase
    
  self.use_transactional_fixtures = true
  self.use_instantiated_fixtures  = false
  
  def ensure_flash(val)
    assert_contains flash.values, val, ", Flash: #{flash.inspect}"
  end
  
  def setup_theme
    @theme = Theme.first || Theme.create
    @theme.current = 'blue'
    @theme.save!
  end
  
  def clean_theme_view_path(controller)
    controller.view_paths.delete_if {|view_path| view_path.to_s.index(Disguise::THEME_PATH) == 0}
  end

  def clean_theme_locale
    I18n.load_path.delete_if {|localization_path| localization_path.index(Disguise::THEME_FULL_BASE_PATH) == 0}
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
disguise-0.1.3 test/rails_root/test/test_helper.rb