aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
Commit message (Collapse)AuthorAgeFilesLines
* Avoid running system tests by defaultRobin Dupret2017-03-051-0/+46
| | | | | | | | | | 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.
* Fix random failure on system test with ajaxFumiaki MATSUSHIMA2017-03-031-0/+28
| | | | | | | | 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
* does not show hidden namespaces in generator's helpyuuji.yaginuma2017-02-241-0/+7
|
* Make help short-cut alias to workyuuji.yaginuma2017-02-241-0/+23
|
* Make version short-cut alias to workyuuji.yaginuma2017-02-241-0/+24
|
* Add back tests for test:units and test:functionals.Kasper Timm Hansen2017-02-231-12/+16
| | | | | | | Would have caught that the invoke changes broke rake delegation behavior. And we do ship the behavior so we should test it.
* Split direct method into twoAndrew White2017-02-211-4/+4
| | | | | Use a separate method called `resolve` for the custom polymorphic mapping to clarify the API.
* Prefer remove_method over undef_methodAndrew White2017-02-211-0/+58
| | | | | | 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.
* Add custom polymorphic mappingAndrew White2017-02-211-4/+98
| | | | | | | | | | | | | | | | 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.
* Rename url_helper to directAndrew White2017-02-211-4/+4
|
* Add support for defining custom url helpers in routes.rbAndrew White2017-02-211-2/+33
| | | | | | | | | | | 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.
* Fix run_via[]= backwards compatibility.Kasper Timm Hansen2017-02-211-0/+10
| | | | | | | | | ``` Minitest.run_via[:rails] = true ``` 👆 would break because a simple alias won't catch the second true argument there.
* Remove unused requireRyuta Kamizono2017-02-122-2/+0
| | | | | | These files are not using `strip_heredoc`. Closes #27976
* Correct spellingBenjamin Fleischer2017-02-051-2/+2
| | | | | | | ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ```
* Collect all file patterns when running multiple rake test tasksDominic Cleal2017-02-041-0/+15
| | | | | | | Replaces the rake_patterns instance variable with simple require, as `autorun` will run tests from all eagerly required test files. Fixes #27801
* Don't mutate raw_source in mailer preview interceptorEugene Kenny2017-01-301-0/+34
| | | | | | | | 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.
* Merge pull request #27797 from y-yagi/correctly_check_error_messageArthur Nogueira Neves2017-01-301-2/+4
|\ | | | | correctly check error message
| * correctly check error messageyuuji.yaginuma2017-01-251-2/+4
| | | | | | | | | | | | | | `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.
* | Merge pull request #27784 from y-yagi/add_warnings_option_to_test_runnerRafael França2017-01-301-0/+11
|\ \ | | | | | | add warnings option to test runner
| * | add warnings option to test runneryuuji.yaginuma2017-01-241-0/+11
| | |
* | | remove warning from `bin/setup` testyuuji.yaginuma2017-01-261-1/+1
| |/ |/| | | | | | | | | | | | | This removes the following warnings. ``` test/application/bin_setup_test.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator ```
* | Bundler 1.14 compatMatthew Draper2017-01-231-1/+4
|/
* Merge two tests that needs to initialize Rails before accessing `Rails`Akira Matsuda2017-01-231-16/+1
| | | | | Fixes "NameError: uninitialized constant ApplicationTests::ConfigurationTests::CustomTest::Rails" when run individually
* update CREATE TABLE statements generated by `sqlite3` commandyuuji.yaginuma2017-01-191-2/+2
| | | | | | | From SQLite 3.16.0, `IF NOT EXISTS` set to CREATE TABLE statements. Ref: https://www.sqlite.org/src/info/c7021960f5c070fb Fixes #27635.
* Fix style guide violationsRafael Mendonça França2017-01-051-1/+0
|
* Merge pull request #27399 from sinogermany/rails-env-for-empty-string-env-varsRafael Mendonça França2017-01-031-0/+12
|\ | | | | | | Rails env for empty string env vars
| * Rails.env falls back to dev mode when env var is emptyDaniel Deng2017-01-041-0/+12
| |
* | Fix configuration test now that Metal#env was removedRafael Mendonça França2017-01-031-1/+1
| |
* | Remove test to the db:test:cloneRafael Mendonça França2017-01-031-10/+0
| |
* | Remove deprecated CONTROLLER environment variable for routes taskRafael Mendonça França2017-01-031-42/+25
| |
* | Remove deprecated config.serve_static_filesRafael Mendonça França2017-01-031-10/+0
| |
* | Remove deprecated `config.static_cache_control`Rafael Mendonça França2017-01-031-10/+0
| |
* | Enforce middleware ordering with a test, instead of commentsMatthew Draper2016-12-311-3/+34
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #27515 from ↵Matthew Draper2016-12-311-2/+2
|\ \ | | | | | | | | | | | | | | | kbrock/fix_log_remote_ip_before_dispatcher_ips_settings Allow log remote ip addres when config.action_dispatch.trusted_proxie…
| * | Allow log remote ip addres when config.action_dispatch.trusted_proxies passedLeonid Batizhevsky2016-12-301-1/+1
|/ /
* | `#tables` and `#table_exists?` and returns only tables and not viewsRafael Mendonça França2016-12-291-5/+3
| |
* | Remove deprecated support to passing a column to #quoteRafael Mendonça França2016-12-291-18/+1
| |
* | Merge branch 'master' into clear_all_environments_log_by_defaultRafael França2016-12-2912-30/+115
|\ \
| * | "Use assert_nil if expecting nil. This will fail in minitest 6."Akira Matsuda2016-12-254-7/+7
| | |
| * | Privatize unneededly protected methods in Railties testsAkira Matsuda2016-12-241-1/+1
| | |
| * | quiet generators log in testyuuji.yaginuma2016-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| * | Limit length of secret being passedJon Moss2016-12-201-3/+3
| | | | | | | | | | | | Very similar to PR #25758, see more in depth reasoning there.
| * | `ARGV.shift` before calling Rails generatorsJon Moss2016-12-171-0/+15
| |/ | | | | | | | | | | 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.
| * Merge pull request #27042 from kirs/yaml-schema-cacheRafael França2016-12-131-2/+2
| |\ | | | | | | Schema cache in YAML
| | * Use YAML to serialize schema cacheKir Shatrov2016-11-271-2/+2
| | |
| * | Remove aggressive unit test with mock. And add integration level test.Taishi Kasuga2016-11-241-0/+19
| | |
| * | deep symbolize keys on secrets.ymlIsaac Sloan2016-11-211-0/+14
| |/
| * Pass `rails runner` args onto file again.Kasper Timm Hansen2016-11-201-0/+8
| | | | | | | | | | | | | | | | | | 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`.
| * Add missing test for singular resource output in rake routesPrathamesh Sonpatki2016-11-191-0/+20
| | | | | | | | | | | | | | | | - 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
| * Merge pull request #27089 from erickueen/erickueen_fix_26606Rafael Mendonça França2016-11-181-3/+3
| |\ | | | | | | | | | Fix incorrect output from rails routes when using singular resources …