Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Oct 6, 2015
  1. @jeremy

    Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat

    jeremy authored
    Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
    that support multiple Rails versions would've had to feature-detect
    whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
    `Mime[:foo]` has been around for ages to look up registered MIME types
    by symbol / extension, though, so libraries and plugins can safely
    switch to that without breaking backward- or forward-compatibility.
    Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
    by type or extension, so it's not available as `Mime[:all]`. We use it
    internally as a wildcard for `respond_to` negotiation. If you use this
    internal constant, continue to reference it with `Mime::ALL`.
    Ref. efc6dd5
Commits on Sep 23, 2015
  1. @tenderlove

    stop applying default headers in ActionDispatch::Response

    tenderlove authored
    I'm making this change so that I can construct response objects that
    *don't* have the default headers applied.  For example, I would like to
    construct a response object from the return value of a controller.
    If you need to construct a response object with the default headers,
    then please use the alternate constructor:
Commits on Sep 21, 2015
  1. @tenderlove

    stop calling deprecated methods

    tenderlove authored
    We should be asking the mime type method for the mime objects rather
    than via const lookup
Commits on Aug 21, 2015
  1. @tenderlove
Commits on Aug 8, 2015
  1. @eileencodes

    Rename `extra_keys` variables to `query_string_keys`

    eileencodes authored
    `extra_keys` is a confusing variable name because it's not clear what is
    "extra". This renames it to `query_string_keys` so it's clear that the
    "extra" is just the query string.
Commits on Aug 7, 2015
  1. @tenderlove

    stop using @_env in the controller instance

    tenderlove authored
    Actions are processed through `dispatch`, so they should have the
    request set on them before any user land code can be executed.  Lets
    stop setting _env on the controller, and give access to it through the
    `env` method.
  2. @grosser

    do not add common ports to HTTP_HOST

    grosser authored
     - webservers do not do it
     - it makes redirect urls ugly when is used for redirection
Commits on Aug 6, 2015
  1. @tenderlove

    sop passing host and secure to the build method

    tenderlove authored
    eventually we will make the cookie jar derive these values from the
    request object rather than save a reference to the values
  2. @tenderlove

    move env access to the request object.

    tenderlove authored
    Accessing a request object has nice advantages over accessing a hash.
    If you use a missing method name, you'll get an exception rather than a
    `nil` (is one nice feature)
Commits on Jul 28, 2015
  1. @robin850
Commits on Jul 17, 2015
  1. @amatsuda

    Oops! :bomb:

    amatsuda authored
  2. @amatsuda
Commits on Jul 14, 2015
  1. @tenderlove

    Rack implements `redirect?` so we don't need it

    tenderlove authored
    Rack [already implements `redirect?` on the response object]( so we don't need to implement our own.
  2. @tenderlove

    use a lookup table for `assert_response`

    tenderlove authored
    We shouldn't depend on specific methods imlemented in the TestResponse
    subclass because the response could actually be a real response object.
    In the future, we should either push the aliased predicate methods in
    TestResponse up to the real response object, or remove them
Commits on Jul 8, 2015
  1. @tenderlove

    assign the cookie hash on request allocation

    tenderlove authored
    this prevents mutations from being available globally
  2. @tenderlove
  3. @tenderlove
  4. @tenderlove
  5. @tenderlove

    let the superclass build the request and response

    tenderlove authored
    We should leverage the request / response objects that the superclass
    has already allocated for us.
  6. @tenderlove
Commits on Jul 7, 2015
  1. @eileencodes @tenderlove

    pass cookies from the jar in the HTTP_COOKIE header

    eileencodes authored tenderlove committed
    we should be pushing the cookies in via headers rather than maintaining
    some object and "recycling" it.
  2. @eileencodes @tenderlove

    Send cookies with request

    eileencodes authored tenderlove committed
Commits on Jun 1, 2015
  1. @rafaelfranca

    Merge pull request #20138 from tgxworld/deprecated_assert_template

    rafaelfranca authored
    Deprecate `assert_template` and `assigns()`.
Commits on May 31, 2015
  1. @eileencodes

    Use `any?` rather than `present?` to check args

    eileencodes authored
    It's better to use Ruby methods when possible over methods defined by
    Active Support because then it does not need to rely on any
Commits on May 30, 2015
  1. @tgxworld
Commits on May 18, 2015
  1. @repinel
Commits on May 2, 2015
  1. @eileencodes

    Use `args` instead of `*args` in `kwargs_request?` method

    eileencodes authored
    `*args` is not required here and should be avoided when not necessary
    because `*args` are slower than `args` and create unnecessary array
Commits on Apr 17, 2015
  1. @sikachu

    Add missing require for String#strip_heredoc

    sikachu authored
    This method is being used in `#xml_http_request`, but was not properly
    required. This causes `NoMethodError` on projects that are doing
    integration test.
Commits on Mar 16, 2015
  1. Compare content_type with Mime::XML instead of regexp

    Boris Peterbarg authored
    Regexp is broken for both content types including charsets and for
    integration tests, where the content_type is a Mime::Type and not String
Commits on Mar 9, 2015
  1. @eileencodes

    Call super last in before_setup

    eileencodes authored
    This fixes the reasons 4cf3b8a, 303567e, and fa63448 needed to be
    reverted in 7142059. The revert has been reverted and this fixes
    the issues caused previously.
    If we call `super` first we will end up nuking the session settings in the
    application tests that do `setup do` - so any session login or cookie
    settings will not be persisted thoughout the test sessions.
    Calling `super` last prevents `@integration_session` from getting nuked
    and set to nil if it's already set.
    Test added to prevent regression of this behavior in the future.
  2. @eileencodes
Commits on Mar 7, 2015
  1. @y-yagi
Commits on Mar 5, 2015
  1. @gsamokovarov

    Revert work arounds for upstream Ruby 2.2.0 kwargs bug

    gsamokovarov authored
    The bug caused a segfault and you can find more info about it at:
    We did a couple of work arounds, but 2.2.1 rolled out and those aren't
    needed anymore.
    Here are the reverted commits:
    - Revert "Work around for upstream Ruby bug #10685",
      commit 707a433.
    - Revert "Fix segmentation fault in ActionPack tests",
      commit 22e0a22.
    I'm also bumping the Ruby version check to 2.2.1 to prevent future
Commits on Mar 1, 2015
  1. @gsamokovarov

    Work around for upstream Ruby bug #10685

    gsamokovarov authored
    In f6e293e we avoided a segfault in the
    tests, however I think we should try to avoid the crash, as it may
    happen in user code as well.
    Here is what I distiled the bug down to:
    # Rails case - works on 2.0, 2.1; crashes on 2.2
    require 'action_dispatch', "Content-Type" => "text/xml")
    # General case - works on 2.0, 2.1; crashes on 2.2
    def foo(optional = {}, default_argument: nil)
    foo('quux' => 'bar')
Commits on Feb 27, 2015
  1. @jeremy

    Revert integration test refactoring that caused app test regressions

    jeremy authored
    Haven't diagnosed yet. No similarly failing tests in Rails to work from.
    cc @tenderlove, @eileencodes
    Revert "there is always an integration session, so remove the check"
    Revert "lazily create the integration session"
    Revert "use before_setup to set up test instance variables"
    This reverts commits 4cf3b8a, 303567e, and fa63448.
Something went wrong with that request. Please try again.