1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Fix Rails-loading in tests.

This commit is contained in:
Nathan Weizenbaum 2010-05-12 15:39:42 -07:00
parent 64f2d8fe61
commit 011b08d1e2
4 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,5 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../test_helper'
require 'haml/template'
class ActionView::Base
def nested_tag
@ -388,7 +387,7 @@ MESSAGE
render("- something_that_uses_haml_concat")
assert false, "Expected Haml::Error"
rescue Haml::Error => e
assert_equal 13, e.backtrace[0].scan(/:(\d+)/).first.first.to_i
assert_equal 12, e.backtrace[0].scan(/:(\d+)/).first.first.to_i
end
class ActsLikeTag

View file

@ -1,6 +1,5 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../test_helper'
require 'haml/template'
require 'sass/plugin'
require File.dirname(__FILE__) + '/mocks/article'

View file

@ -5,10 +5,12 @@ if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib
puts "[ using linked Rails ]"
$:.unshift linked_rails + '/activesupport/lib'
$:.unshift linked_rails + '/actionpack/lib'
$:.unshift linked_rails + '/railties/lib'
end
require 'rubygems'
require 'action_controller'
require 'action_view'
require 'rails'
ActionController::Base.logger = Logger.new(nil)

View file

@ -7,6 +7,7 @@ $:.unshift lib_dir unless $:.include?(lib_dir)
require 'haml'
require 'sass'
require 'haml/template'
Haml::Template.options[:ugly] = false
Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)