diff options
author | Xavier Noria <fxn@hashref.com> | 2010-06-05 01:13:37 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-06-05 01:15:17 +0200 |
commit | 67a43554f153a3ddb97039b5fac305c0619dd372 (patch) | |
tree | defe65bc4dec8844525c93a348dfc9a97eacf237 /railties/test/application | |
parent | 6401ab587021b78c3dc5e4a5ac831823a9258481 (diff) | |
download | rails-67a43554f153a3ddb97039b5fac305c0619dd372.tar.gz rails-67a43554f153a3ddb97039b5fac305c0619dd372.tar.bz2 rails-67a43554f153a3ddb97039b5fac305c0619dd372.zip |
removes Array#random_element and backports Array#sample from Ruby 1.9, thanks to Marc-Andre Lafortune
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index fadcc4c025..35ea2729d3 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -47,7 +47,7 @@ module ApplicationTests test "if there's no config.active_support.bare, all of ActiveSupport is required" do use_frameworks [] require "#{app_path}/config/environment" - assert_nothing_raised { [1,2,3].random_element } + assert_nothing_raised { [1,2,3].sample } end test "config.active_support.bare does not require all of ActiveSupport" do @@ -57,7 +57,7 @@ module ApplicationTests Dir.chdir("#{app_path}/app") do require "#{app_path}/config/environment" - assert_raises(NoMethodError) { [1,2,3].random_element } + assert_raises(NoMethodError) { [1,2,3].sample } end end |