Sha256: 9d2011b90355e1f7196a1a5b9df1a9451b8d175667901f246f2149c3d36b74be

Contents?: true

Size: 993 Bytes

Versions: 12

Compression:

Stored size: 993 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

12 entries across 12 versions & 1 rubygems

Version Path
disguise-0.3.11 test/rails_root/test/test_helper.rb
disguise-0.3.10 test/rails_root/test/test_helper.rb
disguise-0.3.8 test/rails_root/test/test_helper.rb
disguise-0.3.7 test/rails_root/test/test_helper.rb
disguise-0.3.6 test/rails_root/test/test_helper.rb
disguise-0.3.1 test/rails_root/test/test_helper.rb
disguise-0.3.2 test/rails_root/test/test_helper.rb
disguise-0.3.3 test/rails_root/test/test_helper.rb
disguise-0.3.4 test/rails_root/test/test_helper.rb
disguise-0.3.5 test/rails_root/test/test_helper.rb
disguise-0.3.0 test/rails_root/test/test_helper.rb
disguise-0.2.0 test/rails_root/test/test_helper.rb