aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix assertion arguments orderCarlos Antonio da Silva2014-07-311-1/+1
|
* Avoid creating an extra hashCarlos Antonio da Silva2014-07-311-2/+2
|
* Remove unnecessary call to #tapCarlos Antonio da Silva2014-07-311-5/+3
| | | | | This is not storying the RouteSet instance anywhere as the other examples in the file, so no need to use #tap.
* Merge pull request #16356 from gchan/add-hwia-testsYves Senn2014-07-311-0/+12
|\ | | | | Add tests to ensure default proc is used when `HashWithIndifferentAccess' is initialized with a block
| * Add tests to ensure default proc is used when `HashWithIndifferentAccess' is ↵Gordon Chan2014-07-311-0/+12
| | | | | | | | initialized with a block
* | Merge pull request #16355 from xaviershay/validate-in-groups-of-argsAaron Patterson2014-07-302-0/+11
|\ \ | |/ |/| Raise a descriptive error if non-positive integer passed to in_groups_of
| * Raise a descriptive error if non-positive integer passed to in_groups_of.Xavier Shay2014-07-302-0/+11
|/ | | | | | | | | | This is more consistent than the current behaviour of raising a `ZeroDivisionError: divided by 0` error when 0 is given, which can be non-obvious especially if `in_groups_of` is part of a longer chain of methods. The negative case was ok - "ArgumentError: invalid slice size" - but this error is clearer still.
* Properly assert for the expected messagesCarlos Antonio da Silva2014-07-301-4/+8
| | | | | | The message passed to Minitest's assert_raise is used as output in case the assertion fails, but we can test against the exact message by using the actual exception object that is returned from the assert_raise call.
* 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
|
* Merge pull request #16352 from gchan/remove-unnecessary-convert-keyCarlos Antonio da Silva2014-07-301-2/+2
|\ | | | | Removed unnecessary call to 'convert_key' in 'HashWithIndifferentAccess#to_hash'
| * Removed unnecessary call to 'convert_key' in 'HashWithIndifferentAccess#to_hash'Gordon Chan2014-07-311-2/+2
| | | | | | | | All the keys are already Strings by virtue of being a HashWithIndifferentAccess.
* | 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
| |
* | remove useless deupAaron Patterson2014-07-301-1/+1
| | | | | | | | | | every call to default_resources_path_names allocates a new hash, no need to dup
* | push options inside the scope objectAaron Patterson2014-07-301-4/+9
| |
* | turn scope in to a linked listAaron Patterson2014-07-301-15/+36
| | | | | | | | this makes scope rollback much easier
* | don't access named routes internalsAaron Patterson2014-07-301-1/+1
| | | | | | | | just ask whether or not the route is defined
* | remove alias_method_chainAaron Patterson2014-07-301-4/+2
| | | | | | | | we can `super` in to the previous implementation.
* | avoid instrospection on the moduleAaron Patterson2014-07-301-1/+2
| | | | | | | | | | we already know what helpers are path helpers, so just iterate through that list and define the helpers with warnings
* | fix variable nameAaron Patterson2014-07-301-3/+3
| |
* | split path_helpers and url_helpersAaron Patterson2014-07-301-18/+25
| | | | | | | | | | this lets us avoid hard coding a regexp for separating path and url helpers in the clear! method.
* | `add` will remove the method if it exists alreadyAaron Patterson2014-07-301-1/+0
| |
* | Merge pull request #15840 from schneems/schneems/deprecate-mailer_path_methodsXavier Noria2014-07-3012-57/+183
|\ \ | | | | | | Deprecate `*_path` methods in mailers
| * | Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-3012-57/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #16346 from ↵Rafael Mendonça França2014-07-301-5/+5
|\ \ \ | | | | | | | | | | | | | | | | JackDanger/remove_redundant_self_in_class_method_calls Remove redundant `self.` in class method calls
| * | | Remove redundant `self.` in class method callsJack Danger Canty2014-07-301-5/+5
| | |/ | |/| | | | | | | These are the only instances of this in the whole code base.
* | | Merge pull request #16345 from robin850/rbx-tidy-bytesRafael Mendonça França2014-07-301-1/+2
|\ \ \ | |_|/ |/| | Prevent using String#scrub on Rubinius
| * | Prevent using String#scrub on RubiniusRobin Dupret2014-07-301-1/+2
|/ / | | | | | | | | | | Rubinius' has built-in support for String#scrub but it doesn't have yet support for ASCII-incompatible chars so for now, we should rely on the old implementation of #tidy_bytes.
* / Revert "Merge pull request #15305 from tgxworld/remove_unnecessary_require"Santiago Pastorino2014-07-304-2/+5
|/ | | | | | | This reverts commit f632f79b8dcd144408c66a544984b2ba9cf52f87, reversing changes made to 98c7fe87690ca4de6c46e8f69806e82e3f8af42d. Closes #16343
* Merge pull request #15959 from aditya-kapoor/remove-unneeded-casesRafael Mendonça França2014-07-292-26/+17
|\ | | | | remove unneeded test model for ActiveModel test cases.
| * remove unneeded test model for ActiveModel test cases.Aditya Kapoor2014-06-282-26/+17
| |
* | Merge pull request #16339 from rwz/with_options_implicitDavid Heinemeier Hansson2014-07-293-2/+29
|\ \ | | | | | | Add implicit receiver support to `Object#with_options`
| * | Add implicit receiver support to `Object#with_options`Pavel Pravosud2014-07-293-2/+29
| | |
* | | Merge pull request #16335 from arthurnn/rm_parent_state_trasactionRafael Mendonça França2014-07-291-2/+1
|\ \ \ | | | | | | | | Remove @state.parent assignment on commit
| * | | Remove @state.parent assignment on commitArthur Neves2014-07-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This piece of code was introduced on 67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling `committed?` in the `transaction_state` before calling the `committed!` method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the `committed?` check was removed and replaced by a `finalized?`, which only checks if the state is not nil. Thus we can remove that line.
* | | | oops! :bomb:Aaron Patterson2014-07-291-1/+1
| | | | | | | | | | | | | | | | use helpers.include? so we don't get any false positives
* | | | ask the named routes collection if the route is definedAaron Patterson2014-07-292-1/+5
| | | | | | | | | | | | | | | | | | | | we should not be accessing internals to figure out if a method is defined.
* | | | helpers should be a Set so it doesn't grow unboundedAaron Patterson2014-07-291-4/+12
| | | | | | | | | | | | | | | | | | | | since helpers is a set, we can be confident about when to remove methods from the module.
* | | | pass the module to define_named_route_methodsAaron Patterson2014-07-291-7/+7
| | | | | | | | | | | | | | | | after this, we can disconnect @module from the instance
* | | | only ask for the routes module onceAaron Patterson2014-07-291-2/+4
| | | | | | | | | | | | | | | | we can cache the module on the stack, then reuse it
* | | | eval_block should be privateAaron Patterson2014-07-291-0/+1
| | | |
* | | | :nail_care: from #16329 [ci skip]Zachary Scott2014-07-291-1/+1
| | | |
* | | | Merge pull request #16329 from deependersingla/masterZachary Scott2014-07-291-0/+2
|\ \ \ \ | |_|/ / |/| | | GET request should not write to database note added. [ci skip]
| * | | Get request should not write to database note added. [skip ci]Deepender Singla2014-07-291-0/+2
| | | |
* | | | Merge pull request #16336 from akshay-vishnoi/fix-testsRafael Mendonça França2014-07-292-24/+16
|\ \ \ \ | | | | | | | | | | Add missing test case for Array#to_sentence, collect all test cases for Object#to_param at one place and avoid repitition