| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
These tests may be expansive so let's only allow users to run them
through `bin/rails test:system` or by passing a path to the `test`
command.
The same applies for `bin/rake test`.
Refs #28109.
|
|
|
|
|
|
|
|
| |
If application has ajax, browser may begin request after rollback.
`teardown_fixtures` will be called after `super` on `after_teardown`
so we must call `Capybara.reset_sessions!` before `super`
https://github.com/rails/rails/blob/b61a56541aecd7ac685d4f19d943177a3f1b465a/activerecord/lib/active_record/fixtures.rb#L857
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Would have caught that the invoke changes broke rake delegation
behavior.
And we do ship the behavior so we should test it.
|
|
|
|
|
| |
Use a separate method called `resolve` for the custom polymorphic
mapping to clarify the API.
|
|
|
|
|
|
| |
Using `undef_method` means that when a route is removed any other
implementations of that method in the ancestor chain are inaccessible
so instead use `remove_method` which restores access to the ancestor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the use of `direct` to specify custom mappings for polymorphic_url, e.g:
resource :basket
direct(class: "Basket") { [:basket] }
This will then generate the following:
>> link_to "Basket", @basket
=> <a href="/basket">Basket</a>
More importantly it will generate the correct url when used with `form_for`.
Fixes #1769.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the definition of custom url helpers that will be available
automatically wherever standard url helpers are available. The
current solution is to create helper methods in ApplicationHelper
or some other helper module and this isn't a great solution since
the url helper module can be called directly or included in another
class which doesn't include the normal helper modules.
Reference #22512.
|
|
|
|
|
|
|
|
|
| |
```
Minitest.run_via[:rails] = true
```
👆 would break because a simple alias won't catch the second
true argument there.
|
|
|
|
|
|
| |
These files are not using `strip_heredoc`.
Closes #27976
|
|
|
|
|
|
|
| |
```
go get -u github.com/client9/misspell/cmd/misspell
misspell -w -error -source=text .
```
|
|
|
|
|
|
|
| |
Replaces the rake_patterns instance variable with simple require, as
`autorun` will run tests from all eagerly required test files.
Fixes #27801
|
|
|
|
|
|
|
|
| |
The raw_source method is documented as returning the exact value that
was used to create the body; mutating it breaks that contract.
Additionally, if the value used to create the body is blank, raw_source
returns a frozen string which causes the interceptor to raise an error.
|
|\
| |
| | |
correctly check error message
|
| |
| |
| |
| |
| |
| |
| | |
`assert_raise` does not check error message. However, in some tests,
it seems like expecting error message checking with `assert_raise`.
Instead of specifying an error message in `assert_raise`, modify to use
another assert to check the error message.
|
|\ \
| | |
| | | |
add warnings option to test runner
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
This removes the following warnings.
```
test/application/bin_setup_test.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
|
|/ |
|
|
|
|
|
| |
Fixes "NameError: uninitialized constant ApplicationTests::ConfigurationTests::CustomTest::Rails"
when run individually
|
|
|
|
|
|
|
| |
From SQLite 3.16.0, `IF NOT EXISTS` set to CREATE TABLE statements.
Ref: https://www.sqlite.org/src/info/c7021960f5c070fb
Fixes #27635.
|
| |
|
|\
| |
| |
| | |
Rails env for empty string env vars
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want the actual order to be very predictable, so it's rightly defined
in code -- not with an on-the-fly tsort.
But we can do the tsort here, and then verify that it matches the
implemented ordering. This way we don't leave future readers guessing
which parts of the ordering are deliberate and which are arbitrary.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
kbrock/fix_log_remote_ip_before_dispatcher_ips_settings
Allow log remote ip addres when config.action_dispatch.trusted_proxie…
|
|/ / |
|
| | |
|
| | |
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This quiet the following log.
```
create app/mailers/notifier_mailer.rb
invoke erb
create app/views/notifier_mailer
identical app/views/layouts/mailer.text.erb
identical app/views/layouts/mailer.html.erb
create app/views/notifier_mailer/foo.text.erb
create app/views/notifier_mailer/foo.html.erb
invoke test_unit
create test/mailers/notifier_mailer_test.rb
create test/mailers/previews/notifier_mailer_preview.rb
```
|
| | |
| | |
| | |
| | | |
Very similar to PR #25758, see more in depth reasoning there.
|
| |/
| |
| |
| |
| |
| | |
Gems like rspec-rails depend on `ARGV` being shifted, and `scaffold`
(for example) not being the first item in `ARGV`. This should allow
rspec-rails to be passing on Rails master.
|
| |\
| | |
| | | |
Schema cache in YAML
|
| | | |
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When making the new command insfrastructure I had missed that
`bin/rails runner some_file.rb some args` would pass the extra
args onto the file in `ARGV`.
Now fixed by allowing the command to take extra args again, and
make sure to remove the file name from `ARGV`.
|
| |
| |
| |
| |
| |
| |
| |
| | |
- This test was present in https://github.com/rails/rails/pull/27089
but not present on master, may be removed in merge commit?
- There was discussion about moving this to `application/rake_test` so
may be this happened in merge commit.
- https://github.com/rails/rails/pull/27089#discussion_r88731157
|
| |\
| | |
| | |
| | | |
Fix incorrect output from rails routes when using singular resources …
|