diff options
author | Roman V. Babenko <romanvbabenko@gmail.com> | 2012-05-02 13:56:13 +0300 |
---|---|---|
committer | Roman V. Babenko <romanvbabenko@gmail.com> | 2012-05-02 13:56:13 +0300 |
commit | e17cc4d493e369217f216418287a5a0de084915d (patch) | |
tree | 2a979eab711ec0a5ad9a93f3c5441a3391d417fd /railties/test | |
parent | 07438f9ebb82b2d002563af8952db6fa812bbb94 (diff) | |
download | rails-e17cc4d493e369217f216418287a5a0de084915d.tar.gz rails-e17cc4d493e369217f216418287a5a0de084915d.tar.bz2 rails-e17cc4d493e369217f216418287a5a0de084915d.zip |
Gem cont presence checking has been removed
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/backtrace_cleaner_test.rb | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/railties/test/backtrace_cleaner_test.rb b/railties/test/backtrace_cleaner_test.rb index cbe7d35f6d..2dd74f8fd1 100644 --- a/railties/test/backtrace_cleaner_test.rb +++ b/railties/test/backtrace_cleaner_test.rb @@ -1,26 +1,24 @@ require 'abstract_unit' require 'rails/backtrace_cleaner' -if defined? Gem - class BacktraceCleanerVendorGemTest < ActiveSupport::TestCase - def setup - @cleaner = Rails::BacktraceCleaner.new - end +class BacktraceCleanerVendorGemTest < ActiveSupport::TestCase + def setup + @cleaner = Rails::BacktraceCleaner.new + end + + test "should format installed gems correctly" do + @backtrace = [ "#{Gem.path[0]}/gems/nosuchgem-1.2.3/lib/foo.rb" ] + @result = @cleaner.clean(@backtrace, :all) + assert_equal "nosuchgem (1.2.3) lib/foo.rb", @result[0] + end - test "should format installed gems correctly" do - @backtrace = [ "#{Gem.path[0]}/gems/nosuchgem-1.2.3/lib/foo.rb" ] + test "should format installed gems not in Gem.default_dir correctly" do + @target_dir = Gem.path.detect { |p| p != Gem.default_dir } + # skip this test if default_dir is the only directory on Gem.path + if @target_dir + @backtrace = [ "#{@target_dir}/gems/nosuchgem-1.2.3/lib/foo.rb" ] @result = @cleaner.clean(@backtrace, :all) assert_equal "nosuchgem (1.2.3) lib/foo.rb", @result[0] end - - test "should format installed gems not in Gem.default_dir correctly" do - @target_dir = Gem.path.detect { |p| p != Gem.default_dir } - # skip this test if default_dir is the only directory on Gem.path - if @target_dir - @backtrace = [ "#{@target_dir}/gems/nosuchgem-1.2.3/lib/foo.rb" ] - @result = @cleaner.clean(@backtrace, :all) - assert_equal "nosuchgem (1.2.3) lib/foo.rb", @result[0] - end - end end end |