Sha256: e44637226ee41d6fbbc8f1cd71a4ac069ebb84c88fed749f65e10e0a7bdedf8f

Contents?: true

Size: 1.15 KB

Versions: 11

Compression:

Stored size: 1.15 KB

Contents

# encoding: utf-8
require 'rubygems'
require 'test/unit'
require 'shoulda'

# wycats says...
require 'bundler'
Bundler.setup


ENV['RAILS_ENV'] = 'test'

$:.unshift File.dirname(__FILE__) # add current dir to LOAD_PATHS

require "dummy/config/environment"
require "rails/test_help" # adds stuff like @routes, etc.

gem_dir       = File.join(File.dirname(__FILE__), '..')
test_app_dir  = File.join(gem_dir, 'test', 'app')

# Important: Load any test ApplicationHelper before loading cells.
Dir[File.join(test_app_dir, *%w[helpers ** *.rb]).to_s].each { |f| require f }

require 'cells'

Cell::Rails.append_view_path(File.join(test_app_dir, 'cells'))
Cell::Rails.append_view_path(File.join(test_app_dir, 'cells', 'layouts'))

require "cell/test_case"
# Extend TestCase.
ActiveSupport::TestCase.class_eval do
  def assert_not(assertion)
    assert !assertion
  end
end

# Enable dynamic states so we can do Cell.class_eval { def ... } at runtime.
class Cell::Rails
  def action_method?(*); true; end
end

require File.join(test_app_dir, 'cells', 'bassist_cell')
require File.join(test_app_dir, 'cells', 'bad_guitarist_cell')

require "haml"
require "haml/template" # Thanks, Nathan!

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cells-3.5.5 test/test_helper.rb
cells-3.5.4 test/test_helper.rb
cells-3.5.2 test/test_helper.rb
cells-3.5.1 test/test_helper.rb
cells-3.5.0 test/test_helper.rb
cells-3.5.0.beta2 test/test_helper.rb
cells-3.5.0.beta1 test/test_helper.rb
cells-3.4.4 test/test_helper.rb
cells-3.4.3 test/test_helper.rb
cells-3.4.2 test/test_helper.rb
cells-3.4.1 test/test_helper.rb