aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/blank_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* blank? and present? commit to return singletons [Xavier Noria & Pavel Pravosud]Xavier Noria2013-12-281-7/+11
| | | | | | | | | | | | | | | | | | The contract of blank? and present? was in principle to return Object, as we generally do, the test suite and description was consistent with that, but some examples had comments like "# => true". This cannot be unclear, we either fix the examples, or update the contract. Since users may be already assuming singletons due to the examples and the fact that they were returned before 30ba7ee, the safest option seems to be to revise the contract and the implementation of String#blank? The motivation for 30ba7ee was to improve the performance of the predicate, the refactor based on === is on par regarding speed. With this commit we start documenting return types using YARD conventions. We plan to document return types gradually.
* Remove not necessary file, move constants to the file they are usedCarlos Antonio da Silva2013-12-111-0/+8
| | | | | | | | File 'empty_bool.rb' was introduced around 4 years ago in c10958fbddb22052e7cbe5fe6b825cda3cb26e48 to remove method redefined warning in AS test suite, however we do not have such need for reuse anymore, so we can safely move the constants back to the file where they are currently used and get rid of the extra file/require.
* use AS::TestCase as the base classAaron Patterson2012-01-051-1/+1
|
* need magic commentsAkira Matsuda2011-07-141-0/+2
|
* treat fullwidth whitespace as a blank characterAkira Matsuda2011-07-141-1/+1
|
* avoid method redefined; discarding old empty? warning [#4302 state:committed]Santiago Pastorino2010-03-301-8/+0
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Added Object#presence that returns the object if it's #present? otherwise ↵David Heinemeier Hansson2009-12-271-2/+7
| | | | returns nil [DHH/Colin Kelley]
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-0/+1
|
* Added Object#present? which is equivalent to !Object#blank? [DHH]David Heinemeier Hansson2008-06-121-0/+5
|
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speedup String#blank? and remove some overspecified tests.Jeremy Kemper2007-11-141-39/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve tests (closes #7166) [zackchandler]David Heinemeier Hansson2007-09-221-2/+33
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7582 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve various test coverage. Closes #8676 [kamal]Jeremy Kemper2007-06-251-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7117 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4487@asus: jeremy | 2006-04-29 12:21:39 -0700Jeremy Kemper2006-07-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether @flash is defined? for warnings-safety. r4488@asus: jeremy | 2006-04-29 12:23:15 -0700 Check whether @flash is defined? for warnings-safety. Obviates nil? check. r4489@asus: jeremy | 2006-04-29 12:45:18 -0700 Check whether @session is defined? for warnings-safety. r4490@asus: jeremy | 2006-04-29 12:50:41 -0700 Check whether @rendering_runtime is defined? for warnings-safety. r4491@asus: jeremy | 2006-04-29 12:55:01 -0700 Check whether @_cycles is defined? for warnings-safety. r4492@asus: jeremy | 2006-04-29 12:59:19 -0700 Check whether instance variables are defined? for warnings-safety. r4493@asus: jeremy | 2006-04-29 13:14:09 -0700 Add nil @template to PrototypeHelperTest to suppress unitialized instance variable warning. r4494@asus: jeremy | 2006-04-29 13:31:34 -0700 Check whether @auto_index defined? for warnings-safety. r4495@asus: jeremy | 2006-04-29 13:32:24 -0700 Wrap content_columns redefinitions with silence_warnings. r4496@asus: jeremy | 2006-04-29 13:35:28 -0700 Wrap more redefinitions with silence_warnings. r4829@asus: jeremy | 2006-07-08 10:59:20 -0700 abstract unit, fix warnings r4830@asus: jeremy | 2006-07-08 11:06:12 -0700 Use parens to silence warning. r4831@asus: jeremy | 2006-07-08 11:06:48 -0700 Use parens to silence warning. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added reusable reloading support through the inclusion of the Relodable ↵David Heinemeier Hansson2006-01-291-1/+1
| | | | | | module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed 0.blank? to false rather than true since it violates everyone's ↵Jeremy Kemper2005-11-021-0/+13
expectation of blankness. Closes #2518, Closes #2705. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de