aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql/quoting_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* use `assert_not` instead of `refute` as mentioned in our guides.Yves Senn2015-08-131-1/+1
| | | | | | | | | | | As described in the "Follow Coding Conventions" section in our contribution guide (http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions) we favor `assert_not` over `refute`. While we don't usually make stylistic changes on it's own I opted to do it in this case. The reason being that test cases are usually copied as a starting point for new tests. This results in a spread of `refute` in files that have been using it already.
* Remove ivar only when definedAkira Matsuda2015-07-241-2/+2
| | | | this fixes a failing test case
* Ensure that microsecond precision is only used for version of mysql that ↵Jori Hardman2015-07-201-0/+14
| | | | support it. Fixes #19711
* make it possible to run AR tests with bin/testYves Senn2015-06-111-15/+9
|
* Stop relying on columns in mysql quoting testsSean Griffin2015-01-011-6/+2
| | | | | The behavior tested by the removed lines is sufficiently covered elsewhere.
* Delegate `Column#type` to the injected type objectSean Griffin2014-05-191-2/+2
| | | | | | | | | | | | | | | | The decision to wrap type registrations in a proc was made for two reasons. 1. Some cases need to make an additional decision based on the type (e.g. a `Decimal` with a 0 scale) 2. Aliased types are automatically updated if they type they point to is updated later. If a user or another adapter decides to change the object used for `decimal` columns, `numeric`, and `number` will automatically point to the new type, without having to track what types are aliased explicitly. Everything else here should be pretty straightforward. PostgreSQL ranges had to change slightly, since the `simplified_type` method is gone.
* Add a type object to Column constructorSean Griffin2014-05-171-2/+2
| | | | | | Part of #15134. In order to perform typecasting polymorphically, we need to add another argument to the constructor. The order was chosen to match the `oid_type` on `PostgreSQLColumn`.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-2/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* mysql type cast should return integers when typecasting true / falseAaron Patterson2011-04-141-0/+26