diff options
author | Prem Sichanugrist <s@sikachu.com> | 2011-05-22 19:02:54 -0400 |
---|---|---|
committer | Prem Sichanugrist <s@sikachu.com> | 2011-05-22 19:02:54 -0400 |
commit | 90f028a4dc48152baded4cba9ec66474c2e98f48 (patch) | |
tree | 14fdc8456bbba236517d9359ecf5a064c828163c /actionpack | |
parent | d7a910e31e839e5544aa9f83f9922ecfcee74ed5 (diff) | |
download | rails-90f028a4dc48152baded4cba9ec66474c2e98f48.tar.gz rails-90f028a4dc48152baded4cba9ec66474c2e98f48.tar.bz2 rails-90f028a4dc48152baded4cba9ec66474c2e98f48.zip |
Make sure that we're able to run Action Pack test standalone.
Sprocket was trying to look for these two things:
* `Rails::VERSION::STRING`
* `.initializer(str)` in `Rails::Engine`
This commit added require to version.rb into Abstract Unit, and mocking the `Rails::Engine.initializer` in `sprockets_helper_test.rb`
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 1 | ||||
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 60534a9746..ad0ad807db 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -1,4 +1,5 @@ require File.expand_path('../../../load_paths', __FILE__) +require File.expand_path('../../../version', __FILE__) lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") $:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index 8d3be09a4f..47c2787502 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -1,9 +1,14 @@ require 'abstract_unit' + +module Rails + class Engine + def self.initializer(*args); end + end +end + require 'sprockets' require 'mocha' -module Rails; end - class SprocketsHelperTest < ActionView::TestCase tests ActionView::Helpers::SprocketsHelper |