| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line.
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/test/abstract_unit.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This class is only used on the PartialRenderer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The iteration object is available as the local variable
"template_name_iteration" when rendering partials with collections.
It gives access to the +size+ of the collection beeing iterated over,
the current +index+ and two convinicence methods +first?+ and +last?+
"template_name_counter" variable is kept but is deprecated.
[Joel Junström + Lucas Uyezu]
|
| |
| |
| |
| | |
the `asset_host` proc returning nil
|
| |
| |
| |
| |
| |
| | |
Just so it's clearer what's going on in the following assertion.
/cc #11993 @robin850
|
|\ \
| | |
| | | |
Use NameError#name to assert raised error.
|
| | |
| | |
| | |
| | |
| | | |
This makes the test compatible with other Ruby implementations, which
may implement error messages differently.
|
| |/
|/| |
|
| |
| |
| |
| | |
adapter, fixed from #16057 [ci skip]
|
| | |
|
| |
| |
| |
| | |
(This is a manual merge of #9102)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Original implementation has bugs if the regex contains a match group.
Example:
excerpt('This is a beautiful? morning', /\b(beau\w*)\b/i, :radius => 5)
Expected: "...is a beautiful? mor..."
Actual: "...is a beautifulbeaut..."
The original phrase was being converted to a regex and returning the text
either side of the phrase as expected:
'This is a beautiful? morning'.split(/beautiful/i, 2)
# => ["This is a ", "? morning"]
When we have a match with groups the match is returned in the array.
Quoting the ruby docs: "If pattern is a Regexp, str is divided where the
pattern matches. [...] If pattern contains groups, the respective matches will
be returned in the array as well."
'This is a beautiful? morning'.split(/\b(beau\w*)\b/iu, 2)
# => ["This is a ", "beautiful", "? morning"]
If we assume we want to split on the first match – this fix makes that
assumption – we can pass the already assigned `phrase` variable as the place
to split (because we already know that a match exists from line 168).
Originally spotted by Louise Crow (@crowbot) at
https://github.com/mysociety/alaveteli/pull/1557
|
|\ \
| | |
| | | |
remove unnecessary gsub for space in ActionView::Helpers#debug
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The helper will yield each matched word, and you can use this instead of the
':highlighter' option for more complex replacing logic:
highlight('My email is me@work.com', EMAIL_REGEXP) { |m| mail_to(m) }
# => 'My email is <a href="mailto:me@work.com">me@work.com</a>'
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Move cleanup into teardown, delete obsolete code.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
fix build- see https://travis-ci.org/rails/rails/jobs/27578159#L2913.
|
|\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | |
| | | | |
zuhao/refactor_actionview_cleanup_I18n_translations
Clean up I18n stored translations after test.
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Avoid hard-coded value in test setup and teardown.
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | |
| | | |
In tag helper, honor html_safe on arrays; also make safe_join more similar to Array.join
|
| | |
| | |
| | |
| | | |
similar to Array.join by first calling flatten.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
zuhao/refactor_actionview_register_template_handler
Add unregister_template_handler to prevent leaks.
Conflicts:
actionview/CHANGELOG.md
|
|/ / |
|
| |
| |
| |
| | |
reviewed: @tenderlove
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:precision was incorrectly being applied to Rationals
before:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.3"
after:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.33"
|
|\ \
| | |
| | | |
Remove unnecessary include for integration tests.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Allow custom asset host to be passed in asset_url
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is the rebased version of #15026
Closes #15026
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
rename ::_local_prefixes to ::local_prefixes to state the public attribute.
document the latter.
make ::local_prefixes private, test overriding it and remove documentation for overriding ::_parent_prefixes.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Dup options hash to prevent modifications
|