aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Expectations firstAkira Matsuda2014-08-284-9/+9
|
* Reset RACK_ENV after modified in a test caseAkira Matsuda2014-08-281-0/+1
|
* Rails.root should be a PathnameAkira Matsuda2014-08-281-1/+1
|
* fix broken `gem` method with non-String arguments. Closes #16709.Yves Senn2014-08-271-0/+10
| | | | This was caused by #15327.
* Refactor ActionDispatch::RemoteIpSam Aarons2014-08-211-1/+15
| | | | | | | | | | | | | Refactored IP address checking in ActionDispatch::RemoteIp to rely on the IPAddr class instead of the unwieldly regular expression to match IP addresses. This commit keeps the same api but allows users to pass IPAddr objects to config.action_dispatch.trusted_proxies in addition to passing strings and regular expressions. Example: # config/environments/production.rb config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.0/16')
* Require ActiveJob in case a skip_xxx option is givenslainer682014-08-201-0/+1
| | | | Change position of require active_job
* Fix failing railties testsCarlos Antonio da Silva2014-08-191-2/+6
| | | | | | | | | | | | A combination of two commits led into these failures: * The addition of a new active_record config in 24bb8347b6ff0da90059314d9aece7a2c94a272c * The revert of the config to use config.x as options holder in 43073b393d234acd094ac7c220163f4e419d11f5 These tests remove activerecord from the load path, however the configuration is still in the application file, and they blow up.
* Fix setting simple values to the new config.xCarlos Antonio da Silva2014-08-191-5/+12
| | | | | | | | | | Previously setting simple values to the config.x object resulted in the following: config.x.super_debugger = true config.x.super_debugger #=> {} Which was against the examples showed in the changelog/release notes.
* Revert "Improve custom configuration"Rafael Mendonça França2014-08-193-80/+9
| | | | | | | | | This reverts commit de4891344ccc074f6d5693f4fac6ad610584e336. Conflicts: railties/lib/rails/railtie/configuration.rb It added regression. Will be back after the beta
* Improve custom configurationRafael Mendonça França2014-08-193-9/+80
| | | | | | | | | | | | | | | | 1. Hashes can be assigned 2. We don't need a special level anymore The method chain only works in the top level. If users need a second level they need to assign a OrderedOptions to the key: config.resque.server = ActiveSupport::OrderedOptions.new config.resque.server.url = "http://localhost" config.resque.server.port = 3000 [Rafael Mendonça França + Carlos Antonio da Silva]
* Merge pull request #16062 from sgrif/sg-required-generatorsRafael Mendonça França2014-08-172-0/+56
|\ | | | | Add a `required` option to the model generator
| * Add a `required` option to the model generatorSean Griffin2014-08-082-0/+56
| | | | | | | | | | | | | | | | | | | | | | Syntax was chosen to follow the passing of multiple options to decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or `-` to be used as a separator to avoid the need for shell quoting. (I'm intending to expand this to all columns, but that's another PR. The `required` option will cause 2 things to change. `required: true` will be added to the association. `null: false` will be added to the column in the migration.
* | Merge pull request #16481 from sgrif/sg-change-default-timestampsDavid Heinemeier Hansson2014-08-171-1/+1
|\ \ | | | | | | Change the default `null` value for timestamps
| * | Change the default `null` value for timestampsSean Griffin2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* | | Railties tests are order_independent! Hopefully.Akira Matsuda2014-08-131-4/+0
| | |
* | | Fix Railties tests that were order dependentAkira Matsuda2014-08-131-0/+10
|/ /
* | Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
| |
* | users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+4
| | | | | | | | | | Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes everyone's tests order dependent, which should never be done by the framework.
* | add a test for prepending SCRIPT_NAME to generated urlsAaron Patterson2014-08-081-0/+88
| |
* | Fixes test for Gemfile entry changesArun Agrawal2014-08-081-6/+11
|/ | | | Broken by fbe38c9e9d4fe9f82518e8ffc1d757459b0c5f1c
* need to call superAaron Patterson2014-08-071-0/+1
|
* add a new constructor that runs load hooksAaron Patterson2014-08-071-5/+5
|
* lazily instantiate application subclassesAaron Patterson2014-08-061-0/+10
| | | | this means we can meaningfully override methods in the subclass
* Merge pull request #16359 from skanev/after-bundle-in-rails-templatesYves Senn2014-08-061-0/+15
|\ | | | | | | | | | | | | Add an after_bundle callback in Rails templates Conflicts: railties/CHANGELOG.md
| * Add an after_bundle callback in Rails templatesStefan Kanev2014-08-031-0/+15
| | | | | | | | | | | | The template runs before the generation of binstubs – this does not allow to write one, that makes an initial commit to version control. It is solvable by adding an after_bundle callback.
* | Revert "Revert "Merge pull request #15394 from ↵Yves Senn2014-08-061-1/+90
| | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format"" This reverts commit 5c87b5c5248154cf8aa76cce9a24a88769de022d.
* | We don't need parenthesis for thisGuillermo Iguaran2014-08-051-1/+1
| |
* | Fix digest ETAG test.Arthur Neves2014-08-051-1/+1
| | | | | | | | | | | | After https://github.com/rack/rack/commit/12528d4567d8e6c1c7e9422fee6cd8b43c4389bf ETag will include a `W/` before the digest.
* | Bring back the helpers testsJosé Valim2014-08-051-0/+39
| | | | | | | | | | Also keep the hook as other tools may rely on it, we just don't do anything by default on Rails.
* | Pull in the custom configuration concept from dhh/custom_configurationDavid Heinemeier Hansson2014-08-032-0/+52
| |
* | A few more tests asserting the presence of helper test stubsDavid Heinemeier Hansson2014-08-034-12/+0
| |
* | Stubs are no longer generated for helpers, so dont test for itDavid Heinemeier Hansson2014-08-031-4/+0
| |
* | Generating stubs for helper tests is overly specific. Most helpers should ↵David Heinemeier Hansson2014-08-031-54/+0
|/ | | | simply be tested as part of the view thats using them. If you need something beyond that, you can add a test yourself for them
* Avoid defining the test if it does not need to when not on JRubyCarlos Antonio da Silva2014-07-301-2/+2
|
* Use default argument when testing generators without the need for extra argsCarlos Antonio da Silva2014-07-302-7/+7
|
* Simplify path setupCarlos Antonio da Silva2014-07-301-1/+1
|
* Simplify plugin tests a bit, leave the regexp work for minitestCarlos Antonio da Silva2014-07-301-6/+6
|
* Invert unless..else conditions on JRuby checksCarlos Antonio da Silva2014-07-302-12/+12
|
* Remove some more globals from testsCarlos Antonio da Silva2014-07-301-26/+26
| | | | | We are using blocks here so we have access to the environment around them, no need for globals.
* Fix / improve some assertionsCarlos Antonio da Silva2014-07-301-6/+4
|
* Remove some globals from configuration testsCarlos Antonio da Silva2014-07-301-20/+20
|
* Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-302-2/+54
| | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
* Revert "Merge pull request #15305 from tgxworld/remove_unnecessary_require"Santiago Pastorino2014-07-302-2/+2
| | | | | | | This reverts commit f632f79b8dcd144408c66a544984b2ba9cf52f87, reversing changes made to 98c7fe87690ca4de6c46e8f69806e82e3f8af42d. Closes #16343
* Remove mocha usageRafael Mendonça França2014-07-231-2/+5
|
* Merge pull request #16267 from robin850/rbx-yamlRafael Mendonça França2014-07-231-0/+13
|\ | | | | Set Psych as the YAML engine for Rubinius
| * Set Psych as the YAML engine for RubiniusRobin Dupret2014-07-231-0/+13
| | | | | | | | | | | | | | | | | | | | Since the rubysl-yaml gem doesn't ship with Psych by default because of its dependency on libyaml, on Rubinius, the default engine is Syck. However, if we want to be able to run the application safely on different rubies, we need to make people using Rubinius rely on Psych. See http://git.io/uuLVag for further information.
* | Do not set enforce_available_locales to i18n 0.7Rafael Mendonça França2014-07-231-18/+2
|/ | | | | | Now the default is always true. Users still can set it using config.i18n.enforce_available_locales.
* Merge branch 'rm-remove-mocha'Rafael Mendonça França2014-07-1912-77/+166
|\ | | | | | | | | Conflicts: actionpack/test/abstract_unit.rb
| * Stop requiring mocha automaticallyRafael Mendonça França2014-07-197-0/+7
| | | | | | | | | | | | | | | | | | | | | | We are planning to remove mocha from our test suite because of performance problems. To make this possible we should stop require mocha on ActionSupport::TestCase. This should not affect applications since users still need to add mocha to Gemfile and this already load mocha. Added FIXME notes to place that still need mocha removal
| * Stop using mocha on dbconsole_testRafael Mendonça França2014-07-151-44/+68
| |