aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-21 11:21:27 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-21 11:21:27 +0100
commit5f34421c77b4cd873baadbbca877a93de5a4d602 (patch)
tree8182bb1c53864ab06079e14116a61d66e9617f7d /activemodel
parentcf7b94c013d4e824433a018001474e71ddd81a99 (diff)
parentf09ad263cabe2e781c1994b85375fee8deba4317 (diff)
downloadrails-5f34421c77b4cd873baadbbca877a93de5a4d602.tar.gz
rails-5f34421c77b4cd873baadbbca877a93de5a4d602.tar.bz2
rails-5f34421c77b4cd873baadbbca877a93de5a4d602.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activemodel')
-rwxr-xr-xactivemodel/Rakefile1
-rw-r--r--activemodel/lib/active_model.rb5
-rw-r--r--activemodel/test/cases/helper.rb6
3 files changed, 5 insertions, 7 deletions
diff --git a/activemodel/Rakefile b/activemodel/Rakefile
index 1f4a8466c9..f098ce0671 100755
--- a/activemodel/Rakefile
+++ b/activemodel/Rakefile
@@ -15,7 +15,6 @@ task :default => :test
Rake::TestTask.new do |t|
t.libs << "#{dir}/test"
t.test_files = Dir.glob("#{dir}/test/cases/**/*_test.rb").sort
- t.verbose = true
t.warning = true
end
diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb
index 8e14b6724f..e0de27b96d 100644
--- a/activemodel/lib/active_model.rb
+++ b/activemodel/lib/active_model.rb
@@ -21,10 +21,11 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
-$:.unshift(activesupport_path) if File.directory?(activesupport_path)
+activesupport_path = File.expand_path('../../../activesupport/lib', __FILE__)
+$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
require 'active_support'
+
module ActiveModel
extend ActiveSupport::Autoload
diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb
index 024f2378be..30193956ea 100644
--- a/activemodel/test/cases/helper.rb
+++ b/activemodel/test/cases/helper.rb
@@ -1,11 +1,9 @@
-root = File.expand_path('../../../..', __FILE__)
begin
- require "#{root}/vendor/gems/environment"
+ require File.expand_path('../../../../vendor/gems/environment', __FILE__)
rescue LoadError
- $:.unshift("#{root}/activesupport/lib")
end
-lib = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
+lib = File.expand_path('../../../lib', __FILE__)
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
require 'config'