aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* refactor `ActionView::TestCase` internals to track rendered localsYves Senn2012-10-111-11/+29
| | | | | 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-5/+8
|
* prefix TemplateAssertions ivars (#7459)Yves Senn2012-10-011-3/+3
|
* Fix tests broken by adding a new instance variable to view test casesJeremy Kemper2012-09-271-0/+1
|
* Adds missing dependency to ActionView::TestCase::BehaviorAndy Lindeman2012-09-261-0/+2
| | | | | | | | | * The module is needed for the `determine_constant_from_test_name` method. * Without it, the including class is required to also include `ActiveSupport::Testing::ConstantLookup` or a `NoMethodError` will be raised upon instantiation of that class. * Issue introduced in c0a24555f9e2749fb94efe1967cb9943db0b6a7e
* Support helper tests using spec DSLMike Moore2012-09-241-4/+3
| | | | | Improve how helper tests to resolve the helper class from the test name. Add tests for helper tests using the minitest spec DSL.
* Register helper and view tests for minitest's spec DSLMike Moore2012-09-241-0/+3
|
* Don't require action_dispatch in ActionView::UrlHelpersPiotr Sarnacki2012-08-281-0/+1
| | | | | | | | | | ActionDispatch::Routing::UrlFor was always required in UrlHelpers. This was changed by splitting previous implementation of UrlHelper into 2 modules: ActionView::Helpers::UrlHelper and ActionView::Routing::UrlHelper. The former one keeps only basic implementation of url_for. The latter adds features that allow to use routes and is only required when url_helpers or mounted_helpers are required.
* Move ActionController::RecordIdentifier to ActionViewPiotr Sarnacki2012-08-281-1/+1
| | | | | | | Since it's more about DOM classes and ids it belongs to Action View better. What's more, it's more convenient to make it part of Action View to follow the rule that Action Pack can depend on Action View, but not the other way round.
* load active_support/core_ext/module/delegation 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
|
* Allow to use mounted helpers in ActionView::TestCasePiotr Sarnacki2012-06-011-1/+2
| | | | | Similarly to 6525002, this allows to use routes helpers for mounted helpers, but this time in ActionView::TestCase
* 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>