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:
parent
64f2d8fe61
commit
011b08d1e2
4 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require File.dirname(__FILE__) + '/../test_helper'
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
require 'haml/template'
|
|
||||||
|
|
||||||
class ActionView::Base
|
class ActionView::Base
|
||||||
def nested_tag
|
def nested_tag
|
||||||
|
@ -388,7 +387,7 @@ MESSAGE
|
||||||
render("- something_that_uses_haml_concat")
|
render("- something_that_uses_haml_concat")
|
||||||
assert false, "Expected Haml::Error"
|
assert false, "Expected Haml::Error"
|
||||||
rescue Haml::Error => e
|
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
|
end
|
||||||
|
|
||||||
class ActsLikeTag
|
class ActsLikeTag
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require File.dirname(__FILE__) + '/../test_helper'
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
require 'haml/template'
|
|
||||||
require 'sass/plugin'
|
require 'sass/plugin'
|
||||||
require File.dirname(__FILE__) + '/mocks/article'
|
require File.dirname(__FILE__) + '/mocks/article'
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,12 @@ if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib
|
||||||
puts "[ using linked Rails ]"
|
puts "[ using linked Rails ]"
|
||||||
$:.unshift linked_rails + '/activesupport/lib'
|
$:.unshift linked_rails + '/activesupport/lib'
|
||||||
$:.unshift linked_rails + '/actionpack/lib'
|
$:.unshift linked_rails + '/actionpack/lib'
|
||||||
|
$:.unshift linked_rails + '/railties/lib'
|
||||||
end
|
end
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'action_controller'
|
require 'action_controller'
|
||||||
require 'action_view'
|
require 'action_view'
|
||||||
|
require 'rails'
|
||||||
|
|
||||||
ActionController::Base.logger = Logger.new(nil)
|
ActionController::Base.logger = Logger.new(nil)
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ $:.unshift lib_dir unless $:.include?(lib_dir)
|
||||||
require 'haml'
|
require 'haml'
|
||||||
require 'sass'
|
require 'sass'
|
||||||
|
|
||||||
|
require 'haml/template'
|
||||||
Haml::Template.options[:ugly] = false
|
Haml::Template.options[:ugly] = false
|
||||||
|
|
||||||
Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)
|
Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)
|
||||||
|
|
Loading…
Add table
Reference in a new issue