aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* Re-remove deprecated API.kennyj2013-06-281-12/+0
|
* Revert "Add the options method to action_controller testcase."Rafael Mendonça França2013-05-161-6/+0
| | | | | | | | | | | | 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.
* use canonical #controller_path logic in controller test casesLance Ivy2013-05-051-1/+1
|
* applies documentation guidelinesXavier Noria2013-04-221-11/+12
|
* Remove unused block parametersAgis Anastasopoulos2013-04-071-3/+3
|
* Prefer find_by over dynamic finders in rdocSam Ruby2013-04-021-1/+1
|
* Fix typos and improve docs a bit [ci skip]Carlos Antonio da Silva2013-03-151-7/+5
|
* document request simulation methods in functional tests.Yves Senn2013-03-151-7/+27
|
* Skip fetching path if the iteration is going to be skippedCarlos Antonio da Silva2013-03-111-2/+2
|
* Allow use of assert_template with the :file option.Justin Coyne2013-03-011-1/+16
| | | | This worked in Rails 3.2, but was a regression in 4.0.0.beta1
* partials inside directory work with `assert_template`Yves Senn2013-02-041-1/+2
| | | | | | | | | | 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 '/'.
* descriptive `assert_template` error when partial wasn't renderedYves Senn2013-02-041-0/+3
| | | | | | | 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.
* Missing require hash/keysAkira Matsuda2013-02-011-0/+1
|
* Add keys/values methods to TestSessionCarlos Antonio da Silva2013-01-251-0/+8
| | | | Bring back the same API we have with Request::Session.
* Integrate Action Pack with Rack 1.5Carlos Antonio da Silva2013-01-251-1/+14
| | | | | | All ActionPack and Railties tests are passing. Closes #8891. [Carlos Antonio da Silva + Santiago Pastorino]
* Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"Guillermo Iguaran2013-01-181-1/+1
| | | | | This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
* User Rails 4 find_byrobertomiranda2013-01-181-1/+1
|
* Remove useless || operationCarlos Antonio da Silva2013-01-171-2/+1
|
* Inherit from MiniTest::Unit::TestCase instead of MiniTest::SpecRafael Mendonça França2012-12-311-7/+0
|
* assert_template: validating option keysRoberto Soares2012-11-251-0/+2
|
* `assert_template` fails with empty string.Roberto Soares2012-11-231-8/+4
|
* `assert_template` fails with empty string when a template has been renderedRoberto Soares2012-11-231-4/+8
| | | | | | | | For instance, it prevents false positive in this case: file = nil get :index assert_template("#{file}")
* Store FlashHashes in the session as plain hashes rather than custom objects ↵James Coglan2012-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-031-11/+11
|\ | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md
| * Multiple changes to 1,9 hash syntaxAvnerCohen2012-10-271-11/+11
| |
* | Provide a call stack for deprecation warnings where needed.Nikita Afanasenko2012-10-291-3/+3
|/ | | | 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.
* refactor `ActionView::TestCase` internals to track rendered localsYves Senn2012-10-111-9/+4
| | | | | this refactoring extracts the semi complex data structure of rendered locals per view into into a separate class
* recognizes when a partial was rendered twice. Closes #3675Yves Senn2012-10-111-4/+10
|
* can't pass :locals to #assert_template without a view test case. Closes #3415Yves Senn2012-10-061-3/+7
| | | | | | | | | | | 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.
* prefix TemplateAssertions ivars (#7459)Yves Senn2012-10-011-20/+20
|
* Whitespaces :scissors: [ci skip]Rafael Mendonça França2012-09-301-1/+1
|
* `assert_template` no more passing with what ever string that matches.Hugo Roque2012-09-291-5/+12
| | | | | | | | | | | | | | | | | | | | | | | 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
* Also includes ConstantLookup dependency for controller and mailer testsAndy Lindeman2012-09-261-0/+1
|
* Allow strings in the controller test describe blocksMike Moore2012-09-241-0/+1
| | | | | Allow controller tests using the spec DSL to match strings. Add test coverage for the register_spec_type calls.
* Support controller tests using spec DSL - fixes #7743Mike Moore2012-09-241-3/+5
| | | | Add tests for controller tests using the minitest spec DSL.
* Renamed _path_segments to _recallBogdan Gusiev2012-08-041-1/+1
|
* load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* Controller actions are processed in a separate thread for liveAaron Patterson2012-07-291-2/+10
| | | | | | | | | | 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.
* initialize ivars, refactor recycle! to call initializeAaron Patterson2012-07-291-9/+1
|
* issue a warning when we cannot construct a controllerAaron Patterson2012-07-281-2/+10
|
* threads can wait on responses to be committedAaron Patterson2012-07-271-0/+1
|
* deprecate `describe` without a block.Aaron Patterson2012-07-091-1/+1
| | | | | minitest/spec provides `describe`, so deprecate the rails version and have people use the superclass version
* Revert "push parameter instantiation to one method"Aaron Patterson2012-07-051-1/+1
| | | | | | | This reverts commit 9669f6f7883787aa209207cab68b1069636aed9e. This breaks Sam Ruby's tests for some reason. Revert until we figure it out.
* Merge branch 'master' into testcleanAaron Patterson2012-07-051-2/+7
|\ | | | | | | | | | | | | | | | | | | * 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.
| * Add the options method to action_controller testcase.François de Metz2012-07-041-2/+7
| | | | | | | | Signed-off-by: François de Metz <francois@stormz.me>
* | push parameter instantiation to one methodAaron Patterson2012-07-031-1/+1
| |
* | add Mime.fetch so we can have default mime typesAaron Patterson2012-07-031-2/+1
| |
* | make the default environment have actual defaultsAaron Patterson2012-07-031-2/+9
| | | | | | | | | | | | 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.
* | assing the request on the response only onceAaron Patterson2012-07-031-4/+5
| |