1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases
Carlos Antonio da Silva 8d02afeaee Rollback where.like and where.not_like
The real win with these chain methods is where.not, that takes care of
different scenarios in a graceful way, for instance when the given value
is nil.

    where("author.id != ?", author_to_ignore.id)
    where.not("author.id", author_to_ignore.id)

Both where.like and where.not_like compared to the SQL versions doesn't
seem to give us that much:

    Post.where("title LIKE 'ruby on%'")
    Post.where.like(title: 'ruby on%'")
    Post.where("title NOT LIKE 'ruby on%'")
    Post.where.not_like(title: 'ruby on%'")

Thus Rails is adding where.not, but not where.like/not_like and others.
2012-12-07 16:52:55 -02:00
..
adapters Merge pull request #6245 from bogdan/bc_timestamp 2012-11-21 09:34:55 -08:00
associations Move where with blank conditions test to the correct where tests file 2012-12-07 01:08:38 -02:00
attribute_methods Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
coders ActiveRecord::Coders::YAMLColumn#dump should raise an error 2012-03-26 21:57:39 +02:00
connection_adapters Fix memory leak in development mode 2012-11-30 11:50:11 +00:00
connection_specification Fix the skip code. 2012-10-28 23:48:34 -02:00
fixture_set Move/rename files to follow naming conventions 2012-10-07 20:43:18 +02:00
migration Remove method redefined warnings 2012-12-06 22:17:11 -02:00
relation Rollback where.like and where.not_like 2012-12-07 16:52:55 -02:00
tasks Style: remove hash noise 2012-09-21 12:08:02 -07:00
validations Add tests to make sure that the I18n taken message can be overrided in the 2012-10-22 16:53:46 -02:00
adapter_test.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
aggregations_test.rb fix order dependent test in AggregationsTest 2012-08-26 16:32:08 -05:00
ar_schema_test.rb Add migration history to schema.rb dump 2012-12-02 21:16:32 -08:00
associations_test.rb Ensure that associations have a symbol argument. 2012-11-28 13:39:42 -08:00
attribute_methods_test.rb Remove not used require and some useless test comments 2012-11-17 23:00:16 -02:00
autosave_association_test.rb Rename the partial_updates config to partial_writes 2012-10-19 16:45:41 +01:00
base_test.rb arel columns can be used for grouping so that "weird" column names are usable 2012-11-15 13:42:50 -08:00
batches_test.rb Remove extre count, preheat already happens during setup 2012-10-31 12:54:07 -02:00
binary_test.rb Added test to illustrate bad binary blobs. 2012-01-31 13:45:00 -06:00
bind_parameter_test.rb fix todo: use minitest skip instead of return nil 2012-05-13 02:27:52 -05:00
calculations_test.rb Deprecate Relation#sum with a block. 2012-11-21 22:21:01 -02:00
callbacks_test.rb Fix collisions with before and after validation callbacks. 2012-09-23 12:53:50 -06:00
clone_test.rb
column_alias_test.rb
column_definition_test.rb Add uuid type support to PostgreSQL adapter 2012-06-14 17:44:51 +04:00
column_test.rb Fix bug when Column is trying to type cast boolean values to integer. 2012-10-29 22:57:31 -02:00
connection_management_test.rb database connections are automatically established after forking. 2012-02-16 14:33:38 -08:00
connection_pool_test.rb ConnectionPool, unify exceptions, ConnectionTimeoutError 2012-09-11 10:38:27 -04:00
counter_cache_test.rb Fix reset_counters() crashing on has_many :through associations. 2012-10-02 23:49:32 +08:00
custom_locking_test.rb Deprecate ActiveRecord::Base.scoped. 2012-07-27 17:27:47 +01:00
database_statements_test.rb
date_time_test.rb
defaults_test.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
deprecated_dynamic_methods_test.rb Remove mass assignment security from ActiveRecord 2012-09-16 23:58:19 -05:00
dirty_test.rb Remove observers and sweepers 2012-11-28 22:46:49 -02:00
dup_test.rb Call super to nullify the reference to the original errors object in the dup'ed object (call ActiveModel::Validations#initialize_dup). Closes #7291 2012-10-16 15:09:23 +02:00
explain_subscriber_test.rb Don't explain except normal CRUD sql. 2012-09-17 00:22:34 +09:00
explain_test.rb Don't run explain on slow queries for database adapters that don't support it 2012-11-26 09:36:04 -06:00
finder_respond_to_test.rb made dynamic finders alias_attribute aware 2012-06-22 16:44:01 +02:00
finder_test.rb Assert the query result instead of checking for nothing raised 2012-11-13 14:54:47 -02:00
fixtures_test.rb Rename "Fixtures" class to "FixtureSet" 2012-10-07 19:15:58 +02:00
forbidden_attributes_protection_test.rb Added STI support to init and building associations 2012-11-29 05:50:34 +00:00
habtm_destroy_order_test.rb
helper.rb Revert "Fix annoy warning, when executing testcase." 2012-11-30 12:07:55 +04:00
hot_compatibility_test.rb Add an explicit test for hot compatibility 2012-09-28 18:08:14 +01:00
i18n_test.rb
inheritance_test.rb User assert_kind_of, invert assert_equal expectations 2012-11-29 09:59:35 -02:00
invalid_date_test.rb Remove unused assignments from activerecord tests 2012-04-29 10:02:58 -07:00
invertible_migration_test.rb migrate(:down) method with table_name_prefix 2012-01-11 00:35:06 +09:00
json_serialization_test.rb Fix serializable_hash with xml generation and default :except option 2012-06-22 08:28:26 -03:00
locking_test.rb Use a model without counter cache to test read-only attributes 2012-08-21 15:47:02 -03:00
log_subscriber_test.rb Remove ActiveRecord::Base.to_a 2012-08-03 11:51:52 +01:00
migration_test.rb convert time to string 2012-12-06 09:08:10 -08:00
migrator_test.rb Add metadata to schema_migrations 2012-12-01 19:41:09 -08:00
mixin_test.rb
modules_test.rb Deprecate ActiveRecord::Base.scoped. 2012-07-27 17:27:47 +01:00
multiparameter_attributes_test.rb Remove unneeded require 2012-10-06 19:31:57 -03:00
multiple_db_test.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
named_scope_test.rb Remove ActiveRecord::Base.to_a 2012-08-03 11:51:52 +01:00
nested_attributes_test.rb Add test to avoid regression of 58e48d5292 2012-11-08 15:19:44 -02:00
persistence_test.rb Unscope update_column(s) query to ignore default scope 2012-12-06 23:17:56 -02:00
pooled_connections_test.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
primary_keys_test.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
query_cache_test.rb Fix #6951. Use query cache/uncache, when using not only database.yml but also DATABASE_URL. 2012-10-31 10:04:10 +09:00
quoting_test.rb fix quoting for ActiveSupport::Duration instances 2012-07-04 22:39:16 -05:00
readonly_test.rb Remove ActiveRecord::Base.to_a 2012-08-03 11:51:52 +01:00
reaper_test.rb ConnectionPool wait_timeout no longer used for different types of timeouts. #6441 2012-05-23 12:08:11 -04:00
reflection_test.rb remove duplicated require statements in AR test cases 2012-10-09 21:33:54 +02:00
relation_scoping_test.rb Remove ActiveRecord::Base.to_a 2012-08-03 11:51:52 +01:00
relation_test.rb Use separate Relation subclasses for each AR class 2012-11-30 14:06:48 +00:00
relations_test.rb Use separate Relation subclasses for each AR class 2012-11-30 14:06:48 +00:00
reload_models_test.rb
sanitize_test.rb
schema_dumper_test.rb Use CURRENT_TIMESTAMP since it has apparently better cross db support 2012-12-06 22:12:39 -02:00
schema_migration_test.rb convert time to string 2012-12-06 09:08:10 -08:00
serialization_test.rb include_root_in_json allows inheritance. 2012-10-31 00:08:36 +09:00
serialized_attribute_test.rb Fix attributes_before_type_cast for serialised attributes. 2012-10-31 13:16:44 +04:00
store_test.rb fix warning: method redefined 2012-10-02 13:32:54 -03:00
test_case.rb load active_support/deprecation in active_support/rails 2012-08-02 21:59:23 +02:00
timestamp_test.rb Use method compilation for association methods 2012-08-10 23:28:08 +01:00
transaction_callbacks_test.rb Remove observers and sweepers 2012-11-28 22:46:49 -02:00
transaction_isolation_test.rb Skip tests for non-supported isolation levels 2012-09-26 04:29:25 +09:00
transactions_test.rb frozen state should be restored after txn is aborted 2012-10-22 16:48:09 -07:00
unconnected_test.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
validations_repair_helper.rb
validations_test.rb Remove mass assignment security from ActiveRecord 2012-09-16 23:58:19 -05:00
xml_serialization_test.rb Fix AR tests due to builder change with nil values / empty strings 2012-09-07 13:31:28 -03:00
yaml_serialization_test.rb No need to require psych since require yaml does that. 2012-01-04 14:29:13 -03:00