Sha256: b34491e4345e820ef9e9daa64d9ea3e8aacda7fe7edbcb5de62418bdf65b12a5

Contents?: true

Size: 991 Bytes

Versions: 1

Compression:

Stored size: 991 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.name = '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.3.12 test/rails_root/test/test_helper.rb