- 08 3月, 2016 1 次提交
-
-
由 Scott Bronson 提交于
Similar to 176fbfd6, this makes it possible for other test frameworks to hook into Rails integration test facilities.
-
- 07 3月, 2016 1 次提交
-
-
由 yui-knk 提交于
After 9d378747 `ActionDispatch::IntegrationTest` class is loaded and defined in all Rails environments, not only test but also production. This is not-intended loading of a class which is only used in test environment. To prevent not-intended loading, add `ActiveSupport.run_load_hooks` to `ActionDispatch::IntegrationTest` with `action_dispatch_integration_test` name and use it in `ActionMailer`.
-
- 03 3月, 2016 1 次提交
-
-
This reverts changes made to integration tests in PR #23807. The issue happens when using capybara with a driver that needs to start a server in a separate thread like (poltergeist, selenium, etc). Both threads the capybara server one and the test thread end running syncronize over the interlock.
-
- 01 3月, 2016 1 次提交
-
-
由 Matthew Draper 提交于
These should allow external code to run blocks of user code to do "work", at a similar unit size to a web request, without needing to get intimate with ActionDipatch.
-
- 13 2月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Yesterday, when improving how `parsed_body` extracted a parser I wrote 77bbf1e9. Then I thought that was too many changes in one commit and broke it up locally... or so I thought. When pushed the extra commits removed the changes! Wups! In shame, lob those changes together here: * 3b94c38a which meant to fix the CHANGELOG syntax error. * 5007df5e which meant to mention `parsed_body` in the docs. * 036a7a03 which meant to memoize the `parsed_body`.
-
- 12 2月, 2016 2 次提交
-
-
由 Kasper Timm Hansen 提交于
Little easier to understand when you know the method that's used.
-
由 Kasper Timm Hansen 提交于
We're not guaranteed to have a `RequestEncoder` to assign on `get` requests because we aren't extracting the parser from the response content type. Until now.
-
- 11 2月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
When testing: ```ruby post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json ``` It's common to want to make assertions on the response body. Perhaps the server responded with JSON, so you write `JSON.parse(response.body)`. But that gets tedious real quick. Instead add `parsed_body` which will automatically parse the reponse body as what the last request was encoded `as`.
-
- 03 2月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
Prototype, you have served us well. But you are no longer how we make an XMLHttpRequest. RIP
-
- 05 1月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Turns ``` post articles_path(format: :json), params: { article: { name: 'Ahoy!' } }.to_json, headers: { 'Content-Type' => 'application/json' } ``` into ``` post articles_path, params: { article: { name: 'Ahoy!' } }, as: :json ```
-
- 07 12月, 2015 1 次提交
-
-
由 eileencodes 提交于
We want to get rid of the `Live::Response` so we are consolidating methods from `Live::Response` and `Response` by merging them together. This adds an `#empty` method to the request so we don't need to hard-code the empty array each time we call an empty `ActionDispatch::Request`. The work here is a continuation on combining controller and integration test code bases into one.
-
- 28 10月, 2015 1 次提交
-
-
由 Gaurav Sharma 提交于
`skip_filter`, `skip_action_callback` may both are deprecated in Rails 5.1 so waring msg should be specific.
-
- 07 10月, 2015 1 次提交
-
-
由 Jeremy Daer 提交于
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. efc6dd55
-
- 22 9月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
We should be asking the mime type method for the mime objects rather than via const lookup
-
- 22 8月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 08 8月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
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.
-
- 07 8月, 2015 1 次提交
-
-
由 Michael Grosser 提交于
- webservers do not do it - it makes redirect urls ugly when request.host is used for redirection
-
- 28 7月, 2015 1 次提交
-
-
由 Robin Dupret 提交于
-
- 01 6月, 2015 1 次提交
-
-
由 eileencodes 提交于
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 dependencies.
-
- 30 5月, 2015 1 次提交
-
-
由 Guo Xiang Tan 提交于
-
- 18 5月, 2015 1 次提交
-
-
由 Roque Pinel 提交于
Based on #19976 and #18305.
-
- 02 5月, 2015 1 次提交
-
-
由 eileencodes 提交于
`*args` is not required here and should be avoided when not necessary because `*args` are slower than `args` and create unnecessary array allocations.
-
- 18 4月, 2015 1 次提交
-
-
由 Prem Sichanugrist 提交于
This method is being used in `#xml_http_request`, but was not properly required. This causes `NoMethodError` on projects that are doing integration test.
-
- 10 3月, 2015 2 次提交
-
-
由 eileencodes 提交于
This fixes the reasons 4cf3b8ac, 303567e5, and fa634484 needed to be reverted in 71420598. 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.
-
由 eileencodes 提交于
This reverts commit 71420598.
-
- 07 3月, 2015 1 次提交
-
-
由 yuuji.yaginuma 提交于
-
- 27 2月, 2015 1 次提交
-
-
由 Jeremy Kemper 提交于
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 4cf3b8ac, 303567e5, and fa634484.
-
- 26 2月, 2015 1 次提交
-
-
由 Jeremy Kemper 提交于
Fixes regression in #18423. Merge default headers for new responses, but don't merge when creating a response from the last session request. hat tip @senny
❤
-
- 14 2月, 2015 1 次提交
-
-
由 Arthur Neves 提交于
-
- 13 2月, 2015 8 次提交
-
-
由 Guo Xiang Tan 提交于
-
由 Guo Xiang Tan 提交于
-
由 Guo Xiang Tan 提交于
-
由 Aaron Patterson 提交于
there's really no benefit here. It's the same number of lines without the meta programming and is faster
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
now we don't have to call reset! everywhere
-
由 Aaron Patterson 提交于
-
由 eileencodes 提交于
We shouldn't cache if it's not absolutely necessary. Removes route caching and instead skips using the `url_helpers` is the integration test session doesn't require it. Benchmark ips on integration and controller index method tests below. Without any caching or changes to `#url_helpers`: ``` Calculating ------------------------------------- INDEX: Integration Test 71.000 i/100ms INDEX: Functional Test 99.000 i/100ms ------------------------------------------------- INDEX: Integration Test 728.878 (± 8.0%) i/s - 3.692k INDEX: Functional Test 1.015k (± 6.7%) i/s - 5.148k Comparison: INDEX: Functional Test: 1015.4 i/s INDEX: Integration Test: 728.9 i/s - 1.39x slower ``` With caching on `#url_helpers`: ``` Calculating ------------------------------------- INDEX: Integration Test 74.000 i/100ms INDEX: Functional Test 99.000 i/100ms ------------------------------------------------- INDEX: Integration Test 752.377 (± 6.9%) i/s - 3.774k INDEX: Functional Test 1.021k (± 6.7%) i/s - 5.148k Comparison: INDEX: Functional Test: 1021.1 i/s INDEX: Integration Test: 752.4 i/s - 1.36x slower ``` Afer removing the caching and bypassing the `url_helpers` when not necessary in the session: ``` Calculating ------------------------------------- INDEX: Integration Test 87.000 i/100ms INDEX: Functional Test 97.000 i/100ms ------------------------------------------------- INDEX: Integration Test 828.433 (± 6.4%) i/s - 4.176k INDEX: Functional Test 926.763 (± 7.2%) i/s - 4.656k Comparison: INDEX: Functional Test: 926.8 i/s INDEX: Integration Test: 828.4 i/s - 1.12x slower ```
-
- 01 2月, 2015 1 次提交
-
-
由 Kir Shatrov 提交于
in `ActionController::TestCase` and `ActionDispatch::Integration` Old syntax: `xhr :get, :create, params: { id: 1 }` New syntax example: `get :create, params: { id: 1 }, xhr: true`
-
- 29 1月, 2015 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-