| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Follow up to #27109.
|
|
|
|
|
|
|
|
|
|
| |
- The query needs to be executed for hitting `select_all` so made sure
that query gets executed.
- Also instead of changing instance variable, just add new
configuration for prepared_statements: false and use it for this
test.
- This way we don't have to touch the internals of AR code and still
disable prepared statements config for this test.
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
|
|
|
| |
Reported on #21509, how views is treated by `#tables` are differ
by each adapters. To fix this different behavior, after Rails 5.0
is released, deprecate `#tables`.
And `#table_exists?` would check both tables and views.
To make their behavior consistent with `#tables`, after Rails 5.0
is released, deprecate `#table_exists?`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As of Ruby 2.2, Psych can handle any object which is marshallable. This
was not true on previous versions of Ruby, so our delegator types had to
provide their own implementation of `init_with` and `encode_with`.
Unfortunately, this doesn't match up with what Psych will do today.
Since by the time we hit this layer, the objects will have already been
created, I think it makes the most sense to just grab the current type
from the class.
|
| |
|
| |
|
|
|
|
| |
/cc @sgrif
|
| |
|
|
|
|
| |
Creating and dropping similar tables within the same connection causes postgresql to look up old values in the cache of tables which have already been dropped.
|
|
|
|
| |
This setups the helper method which other tests can benefit from.
|
| |
|
|
|
|
|
|
| |
This reverts commit a3024f81228d7b3b446408114a5dc2a86870cd35.
REASON: Since warning doesn't exist
|
|
|
|
|
|
|
|
|
|
| |
In the end I think the pain of implementing this seamlessly was not
worth the gain provided.
The intention was that it would allow plain ruby objects that might not
live in your main application to be subclassed and have persistence
mixed in. But I've decided that the benefit of doing that is not worth
the amount of complexity that the implementation introduced.
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 98043c689f945cabffc043f4bdc80ab2a7edc763.
Because if every time `debug.log` is truncated,
developers have no way to see the previous ActiveRecord unit test results.
`debug.log` file can be easily reduced
by executing `$ touch /dev/null > debug.log` periodically.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Method compilation provides better performance and I think the code
comes out cleaner as well.
A knock on effect is that methods that get redefined produce warnings. I
think this is a good thing. I had to deal with a bunch of warnings
coming from our tests, though.
|
| |
|
| |
|
|
|
|
|
| |
This is the 'top level' connection, inherited by any models that include
ActiveRecord::Model or inherit from ActiveRecord::Base.
|
| |
|
| |
|
|
|
|
| |
location of the config.yml file for running the tests
|
|
|
|
| |
running unit tests
|
| |
|
| |
|
|
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.
|