aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | group things that are alikeAaron Patterson2012-07-031-10/+7
| |
* | push functional test specific methods to it's own moduleAaron Patterson2012-07-031-1/+5
| |
* | test should be testing to_param not to_s, remove Array subclassAaron Patterson2012-07-031-5/+1
| |
* | push the cookie writing stuff out of the controllerAaron Patterson2012-07-031-0/+6
| | | | | | | | merging cookies is responsibility of the test runner
* | extend the controller with special logic on recycleAaron Patterson2012-07-031-6/+3
| | | | | | | | | | | | For some reason, this special logic is only supposed to be executed on the second request. For now, we'll extend on recycle, but we should figure out why this functionality can't be run on every request
* | push req / res setting to the test runnerAaron Patterson2012-07-031-1/+10
|/ | | | | Try to avoid making the controller mutate itself so that we can eventually make the response async
* Merge pull request #6805 from tim-vandecasteele/uploadedfile-paramifyCarlos Antonio da Silva2012-06-231-1/+1
|\ | | | | Don't paramify ActionDispatch::Http::UploadedFile in tests
| * Don't paramify ActionDispatch::Http::UploadedFile in testsTim Vandecasteele2012-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | To test uploading a file without using fixture_file_upload, a posted ActionDispatch::Http::UploadedFile should not be paramified (just like Rack::Test::UploadedFile). (Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't share the same API, tempfile is not accessible on Rack::Test::UploadedFile as discussed in https://github.com/brynary/rack-test/issues/30)
* | add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|/
* Fix incorrect assert_block -> assert conversion. Assumed too much from the ↵Jeremy Kemper2012-05-171-2/+2
| | | | MiniTest deprecation message.
* MiniTest deprecated #assert_block in favor of calling #assert with a blockJeremy Kemper2012-05-171-1/+1
|
* Removing ==Examples and last blank lines of docs from actionpackFrancesco Rodriguez2012-05-151-6/+1
|
* Improve assert_template layout checkingAlexey Vakhov2012-05-041-3/+15
|
* Fix assert_template :layout => nil assertionAlexey Vakhov2012-05-041-2/+5
|
* Fix assert_template assertion with :layout optionAlexey Vakhov2012-05-041-1/+1
|
* Merge pull request #6034 from ↵Piotr Sarnacki2012-04-301-1/+0
|\ | | | | | | | | willbryant/flash_must_not_load_session_on_every_request_master Fix the Flash middleware loading the session on every request
| * fix the Flash middleware loading the session on every request (very ↵Will Bryant2012-04-281-1/+0
| | | | | | | | dangerous especially with Rack::Cache), it should only be loaded when the flash method is called
* | Fix controller_class_name for anonymous controllers.Michael Schuerig2012-04-291-1/+1
| |