| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0303c2325fab253adf5e4a0b738cb469c048f008.
Conflicts:
actionpack/lib/action_controller/test_case.rb
REASON: It will conflict with a lot of test cases. Better to call
`process` directly since this is a very uncommon HTTP method.
Fixes #10638.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This worked in Rails 3.2, but was a regression in 4.0.0.beta1
|
|
|
|
|
|
|
|
|
|
| |
previously when a partial was placed inside a directory
(eg. '/dir/_partial'), `assert_template` did not replace
the '_' prefix when looking through rendered tempaltes,
which resulted in an error.
I modified it to replace both, the leading '_' and the last '_'
after a '/'.
|
|
|
|
|
|
|
| |
When `assert_template` is used with the :locals option, and the
partial was not rendered, a method_missing error was raised.
This changes first checks, if the partial actually was rendered
and raises a descriptive error.
|
| |
|
|
|
|
| |
Bring back the same API we have with Request::Session.
|
|
|
|
|
|
| |
All ActionPack and Railties tests are passing. Closes #8891.
[Carlos Antonio da Silva + Santiago Pastorino]
|
|
|
|
|
| |
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing
changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
For instance, it prevents false positive in this case:
file = nil
get :index
assert_template("#{file}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with unstable class names and instance variables.
Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.
Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.
Remove blank lines I introduced in controller/test_case.rb.
Unit tests for FlashHash#to_session_value.
Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.
Test that Rails 3.2 session flashes are correctly converted to the new format.
Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.
Fix session['flash'] deletion condition: it will never be empty?, it will either be nil or a hash with 'discard' and 'flashes' keys.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
actionpack/lib/action_controller/metal/mime_responds.rb
activerecord/lib/active_record/attribute_methods.rb
guides/source/working_with_javascript_in_rails.md
|
| | |
|
|/
|
|
| |
It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
|
|
|
|
|
| |
this refactoring extracts the semi complex data structure of rendered locals
per view into into a separate class
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
the documentation on #assert_template states that the :locals option is
only available in view test cases:
# In a view test case, you can also assert that specific locals are passed
# to partials:
I added a warning when it's passed in an inapropriate context to prevent
a NoMethodError.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given Im rendering an template `/layout/hello.html.erb`, assert_template was
passing with any string that matches. This behavior allowed false passing like:
assert_template "layout"
assert_template "out/hello"
Now the passing possibilities are:
assert_template "layout/hello"
assert_template "hello"
fixing assert_template bug when template matches expected, but not ends with
Cherry Pick Merge: Fixes issue #3849 assert_template false positive
taking redundant test off
prevening incorrect assert_template when rendering with repeated names in path
updating CHANGELOG with bugfix: assert_template false passing
|
| |
|
|
|
|
|
| |
Allow controller tests using the spec DSL to match strings.
Add test coverage for the register_spec_type calls.
|
|
|
|
| |
Add tests for controller tests using the minitest spec DSL.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
responses.
Processing controller actions in a separate thread allows us to work
around the rack api - we can allow the user to set status and headers,
then block until the first bytes are written. As soon as the first
bytes are written, the main thread can return the status, headers, and
(essentially) a queue for the body.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
minitest/spec provides `describe`, so deprecate the rails version and
have people use the superclass version
|
|
|
|
|
|
|
| |
This reverts commit 9669f6f7883787aa209207cab68b1069636aed9e.
This breaks Sam Ruby's tests for some reason. Revert until we figure it
out.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master:
Add documentation for inheritance_column method
Use ArgumentError vs. RuntimeError, which is more precise.
CSV fixtures aren't supported by default anymore, update generated test_helper.rb to reflect that
fix quoting for ActiveSupport::Duration instances
Add few information on the field types
Add the options method to action_controller testcase.
|
| |
| |
| |
| | |
Signed-off-by: François de Metz <francois@stormz.me>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
instead of deleting keys on every instantiation, create defaults we
actually use. eventually we can pass an environment in to the request,
and create a new req / res object on each call.
|
| | |
|