Skip to content
Browse files

Fix regex that subs rails for activerecord gem path in 2.x

  • Loading branch information...
1 parent dd2a2d0 commit 02c2a14a1730208f617b741dad4902e4736556f8 @nicksieger nicksieger committed Feb 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/abstract_db_create.rb
View
2 test/abstract_db_create.rb
@@ -83,7 +83,7 @@ def setup_rails2
ar_version = $LOADED_FEATURES.grep(%r{active_record/version}).first
ar_lib_path = $LOAD_PATH.detect {|p| p if File.exist?File.join(p, ar_version)}
ar_lib_path = ar_lib_path.sub(%r{activerecord/lib}, 'railties/lib') # edge rails
- rails_lib_path = ar_lib_path.sub(/activerecord/, 'rails') # gem rails
+ rails_lib_path = ar_lib_path.sub(/activerecord-([^\/]+)/, 'rails-\1') # gem rails
load "#{rails_lib_path}/tasks/databases.rake"
end

0 comments on commit 02c2a14

Please sign in to comment.
Something went wrong with that request. Please try again.