| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In integration tests, you might want to use helpers from engines that
you mounted in your application. It's not hard to add it by yourself,
but it's unneeded boilerplate. mounted_helpers are now included by
default. That means that given engine mounted like:
mount Foo::Engine => "/foo", :as => "foo"
you will be able to use paths from this engine in tests this way:
foo.root_path #=> "/foo"
(closes #6573)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, assert_recognizes, assert_generates, and
assert_routing raised ActionController::RoutingError when they failed to
recognize the route.
This commit changes them to raise Assertion instead. This aligns with
convention for logical failures, and supports reporting tools that care
about the difference between logical failures and errors e.g. the
summary at the end of a test run.
- Fixes #5899
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit improves the handling of default_url_options in integration
tests by making behave closer to how a real application operates.
Specifically the following issues have been addressed:
* Options specified in routes.rb are used (fixes #546)
* Options specified in controllers are used
* Request parameters are recalled correctly
* Tests can override default_url_options directly
|
| |
|
|\
| |
| | |
Updated/changed unneeded tr/gsubs
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| | |
# File lib/rack/response.rb, line 114
114: def successful?; @status >= 200 && @status < 300; end
|
| | |
|
|/ |
|
|
|
|
| |
add tests for stripping \r\n chars since that's already happening
|
|\
| |
| |
| |
| | |
mattfawcett/2781-fix-querystring-route-constraint-for-testing
Fix for #2781
|
| |
| |
| |
| | |
constraints on the querystring. Issue #2781
|
|/
|
|
|
|
| |
There was a mix, sometimes patch first, sometimes put first.
Use always patch first, since this is going to be the
primary verb for updates.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PATCH is the correct HTML verb to map to the #update action. The
semantics for PATCH allows for partial updates, whereas PUT requires a
complete replacement.
Changes:
* adds config.default_method_for_update you can set to :patch
* optionally use PATCH instead of PUT in resource routes and forms
* adds the #patch verb to routes to detect PATCH requests
* adds #patch? to Request
* changes documentation and comments to indicate support for PATCH
This change maintains complete backwards compatibility by keeping :put
as the default for config.default_method_for_update.
|
|\
| |
| |
| |
| | |
willbryant/assigns_should_not_stringify_values_master
assigns(:foo) should not convert @foo's keys to strings if it happens to be a hash
|
| |
| |
| |
| | |
a hash
|
|/ |
|
|
|
|
|
|
| |
$ curl -s http://www.ietf.org/rfc/rfc4287 | grep -io ATOM | sort | uniq -c
582 atom
175 Atom
|
|
|
|
|
|
| |
This documentation came from the assert_select plugin, but the
assert_select_feed method was omitted when the plugin was merged
into Rails in 3142502964f94d6144312ae2c368b4c4589fa25a.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
set AD::IntegrationTest.app in railtie initializer
|
|
|
|
| |
its own.
|
|
|
|
| |
This reverts commit 0e4748cd415660eb91e63d50aa15cdd027c612dd.
|
|
|
|
| |
converting the Mail::Body to a string to prevent errors.
|
| |
|
|
|
|
| |
called in assert_response already. changed names of local variables in order to recognize the semantics a bit easier.
|
| |
|
|
|
|
|
|
| |
This allows test classes that are not subclasses of
ActiveSupport::TestCase (like those in rspec-rails) to interact with
with this variable without having to reference ActiveSupport::TestCase.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:
@request.env['HTTP_COOKIE'] = 'user_name=david'
get :index
assert_equal 'david', cookies[:user_name]
and
@request.cookies[:user_name] = 'david'
get :index
assert_equal 'david', cookies[:user_name]
Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
|