aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert usage of safe constantizeJosé Valim2012-01-261-1/+3
|
* Move render_to_body logic to return a spaced string to AC::RenderingCarlos Antonio da Silva2012-01-171-2/+0
| | | | | | | | | | | This seems to be required only when calling render :partial with an empty collection from a controller. This call happens to return no content, letting the response body empty, which means to Rails that it should go on and try to find a template to render based on the current action name, thus failing hard. Although tests keep all green, we need to check a better way to fix this.
* instance_variables method returns symbols in 1.9 rubySergey Nartimov2012-01-071-26/+26
|
* Merge pull request #3196 from avakhov/patch-am-av-tests-2José Valim2011-10-091-1/+6
|\ | | | | Improve tests method for ActionView::TestCase and ActionMailer::TestCase
| * normalize arg for ActionView::TestCase tests methodAlexey Vakhov2011-10-031-1/+6
| |
* | missed underscore in AV::TestCase helper_method documentationAlexey Vakhov2011-10-031-1/+1
|/
* Use safe_constantize where possible.José Valim2011-09-231-3/+1
|
* removed deprecated methods, and related tests, from ActionPackJosh Kalderimis2011-05-241-6/+0
|
* Use remove possible method here.José Valim2011-05-041-1/+2
|
* Move prefixes to view paths as they are now a lookup context dependency.José Valim2011-05-041-0/+2
|
* Remove dependency from _template.José Valim2011-05-011-3/+13
|
* renames response_from_page_or_rjs -> response_from_page, and extracts the ↵Xavier Noria2011-04-131-1/+1
| | | | RJS in it
* test/unit in ruby trunk adds a new instance variable. YAY!Aaron Patterson2011-03-081-0/+1
|
* minitest added @__io__, so we should ignore it tooAaron Patterson2011-01-171-0/+1
|
* Reuse the view_context from the controller, this make the test environment ↵Santiago Pastorino2011-01-121-4/+1
| | | | more similar to the code applications uses
* Allow view in AV::TestCase to access it's controller helpers methodsSantiago Pastorino2011-01-121-0/+1
|
* two argument String#slice is faster than single argument, also avoid ↵Aaron Patterson2010-10-031-1/+1
| | | | creating a Range object
* PERF: Hash[] + map is faster than this silly inject, and var[1..-1] is ↵Santiago Pastorino2010-10-031-3/+3
| | | | faster than var.sub('@', '')
* Rename _assigns to view_assigns in AV::TCDavid Chelimsky2010-10-031-9/+21
| | | | | | | | | - also add tests - also deprecate _assigns [#5751 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Revert "Perf: refactor _assign method to avoid inject and defining unneeded ↵José Valim2010-10-021-1/+5
| | | | | | | | local var." _assigns must return a hash. This reverts commit e66c1cee86aba1c81152f3d0872313e65cec85a9.
* Avoid (@_var ||= nil) pattern by using initialize methods and ensuring ↵José Valim2010-09-291-11/+11
| | | | everyone calls super as expected.
* Don't define _test_case method if already defined.Emilio Tagua2010-09-281-2/+4
|
* Remove method previous method if already defined.Emilio Tagua2010-09-271-0/+1
|
* Refactor decode_credentials to avoid inject and use map instead.Emilio Tagua2010-09-221-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Perf: refactor _assign method to avoid inject and defining unneeded local var.Emilio Tagua2010-09-221-5/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Allow view helper's #initialize method to be called. [#5061 state:resolved]Carl Lerche2010-09-131-1/+5
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Moved PolymorphicRoutes to ActionDispatch::RoutingPiotr Sarnacki2010-07-201-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Unify routes naming by renaming router to routesPiotr Sarnacki2010-07-021-5/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Convert instance_variables to symbols before excluding internal vars [#4965 ↵rohit2010-06-281-1/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Expose view via the view() method in AV::TestCase::BehaviorDavid Chelimsky2010-06-231-5/+8
| | | | | | | | | | - was exposed as _view, which suggested it was private - left _view as an alias of view as not to break any extensions that are relying on _view [#4932 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* In ActionView::TestCase::Behavior, assign variables right beforeDavid Chelimsky2010-06-231-1/+2
| | | | | | | | | | | rendering the view. - Previously, _assigns were locked down the first time _view was referenced. [#4931 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* update the list of instance variables that are excluded from assigns in view ↵David Chelimsky2010-06-221-9/+10
| | | | | | | | tests [#4930 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add support for specifying locals in view tests with assert template [#4927 ↵David Chelimsky2010-06-221-0/+15
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge remote branch 'rails/master'Xavier Noria2010-06-201-0/+1
|\ | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb
| * Support render_template in view tests. Useful for specifying whichDavid Chelimsky2010-06-201-0/+1
| | | | | | | | | | | | | | | | partials are rendered under different conditions. [#4903 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* | Final touches and fixes.Rizwan Reza2010-06-211-0/+1
|/
* Memoize the object returned by _view in ActionView::TestCase::BehaviorDavid Chelimsky2010-06-081-6/+8
| | | | | | [#4799 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* In AV::TC, move protect_against_forgery? from the test_case to theDavid Chelimsky2010-06-031-4/+9
| | | | | | | | | | | | | _helper module included in the view. - ensures that protect_against_forgery? is present when a helper included in a partial that is rendered by the template under test calls it (which happens in FormTagHelper#extra_tags_for_form, for example). [#4700 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Support configuration of controller.controller_path on instances ofDavid Chelimsky2010-05-261-2/+7
| | | | | | | | | | ActionView::TestCase::TestController without stubs. Just say: @controller.controller_path = "path/i/need/for/this/test" [#4697 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move AV::TC to AV::TC::Behavior [#4678 state:resolved]David Chelimsky2010-05-241-65/+85
| | | | | | | | | | | | - enables alternative testing frameworks to include AV::TC::Behavior instead of subclassing AV::TC - also added tests and code for: - test view delegates :notice to request.flash - useful since generators generate views that use notice - test case doesn't try to include modules that are actually classes Signed-off-by: José Valim <jose.valim@gmail.com>
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-201-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Clean up the config object in ActionPack. Create config_accessor which just ↵José Valim2010-04-221-1/+1
| | | | delegates to the config object, reducing the number of deprecations and add specific tests.
* Missing requireswycats2010-04-161-0/+1
|
* Refactored url_for in AV to have its own instances of the helpers instead of ↵wycats2010-04-031-1/+6
| | | | proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win)
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
|
* Modify assert_template to use notifications. Also, remove ↵Carlhuda2010-03-171-1/+3
| | | | ActionController::Base#template since it is no longer needed.
* Remove unneeded AV::Base and AV::Template monkey-patchesCarlhuda2010-03-171-21/+0
|
* Modify assert_template to use instrumentationCarlhuda2010-03-171-0/+1
|
* Do not always include the named URL helpers into AC::Base and AV::Base.Carl Lerche2010-03-161-1/+2
|