aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/load_error_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixes `warning: mismatched indentations at 'rescue' with 'def' at 15`.utilum2018-12-211-2/+2
| | | | See https://travis-ci.org/rails/rails/jobs/470890129#L2361
* Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin blockRyuta Kamizono2018-12-211-4/+3
| | | | | | | | | | Currently we sometimes find a redundant begin block in code review (e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205). I'd like to enable `Style/RedundantBegin` cop to avoid that, since rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5 (https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with that situation than before.
* Fix #29632 - nil #path leads to NoMethodError in LoadError#is_missing?Neil Souza2018-05-041-0/+7
| | | | | | | | See #29632 for details. In short, it's possible to enter `LoadError#is_missing?` when `LoadError#path` returns `nil`, leading to `path.sub` throwing an none-to-helpful `NoMethodError`. This tiniest of patch inserts `#to_s` before the `sub` call to make sure it succeeds. Affected surface area should be just as tiny since something has already gone wrong to get us into `#is_missing?` and the current behavior when `#path` returns `nil` seems clearly not intended. [Gannon McGibbon + Neil Souza]
* Bump RuboCop to 0.51.0Koichi ITO2017-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Summary RuboCop 0.51.0 was released. https://github.com/bbatsov/rubocop/releases/tag/v0.51.0 And rubocop-0-51 channel is available in Code Climate. https://github.com/codeclimate/codeclimate-rubocop/issues/109 This PR will bump RuboCop to 0.51.0 and fixes the following new offenses. ```console % bundle exec rubocop Inspecting 2358 files (snip) Offenses: actionpack/lib/action_controller/metal/http_authentication.rb:251:59: C: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. [key.strip, value.to_s.gsub(/^"|"$/, "").delete('\'')] ^^^^ activesupport/test/core_ext/load_error_test.rb:8:39: C: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. assert_raise(LoadError) { require 'no_this_file_don\'t_exist' } ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2358 files inspected, 2 offenses detected ```
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Remove deprecated constant MissingSourceFIleAndrew White2016-11-141-8/+0
|
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies new string literal convention in activesupport/testXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Deprecate `MissingSourceFile` in favor of `LoadError`.Rafael Mendonça França2015-01-021-0/+9
| | | | | `MissingSourceFile` was just an alias to `LoadError` and was not being raised inside the framework.
* replace use of MissingSourceFile with LoadErrorAkira Matsuda2013-01-041-16/+1
|
* use AS::TestCase as the base classAaron Patterson2012-01-051-2/+2
|
* Stop overriding LoadError.new to return a MissingSourceError (and sometimes ↵Yehuda Katz2010-01-191-0/+15
| | | | nil!)
* Explicit test dependenciesJeremy Kemper2009-03-281-0/+1
|
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-2/+2
| | | | [#1617 state:resolved]
* * Continue evolution toward ActiveSupport::TestCase and friends. #10679 ↵Jeremy Kemper2008-01-051-0/+16
[Josh Peek] * TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de