Joshua Peek
21e7b84621
Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks
2009-10-12 22:15:43 -05:00
Joshua Peek
9bc8defe38
Use "run_callbacks :foo" since it is the public api for callbacks [ #3329
...
state:resolved]
2009-10-12 21:58:49 -05:00
Jeremy Kemper
cbb70c896c
Bundle with system gem sources rather than gems.rubyforge.org default
2009-10-11 12:35:01 -07:00
Joshua Peek
8b46c50eac
Kill mock routing assertion that tests router implementation
2009-10-10 21:30:51 -05:00
Joshua Peek
e61bc8e29f
Fix failing safe buffer test. We don't patch CGI.escapeHTML, only ERB:Util.
2009-10-10 21:30:51 -05:00
Joshua Peek
1610cd0827
Move safe buffer into test/template
2009-10-10 21:30:51 -05:00
Joshua Peek
21be1dcffa
Relative url generations are covered more thoroughly by url rewriter tests
2009-10-10 21:30:50 -05:00
Joshua Peek
673f73b538
Add define another "stuff" controller to support routing tests
2009-10-10 21:30:50 -05:00
Joshua Peek
5d071b4bc2
Drop implementation specific routing test assertions
2009-10-10 21:30:50 -05:00
Joshua Peek
7bc5e3bd02
Add define a "stuff" controller in fixtures to support routing tests
2009-10-10 21:30:50 -05:00
Yehuda Katz
b9ce8216fa
Fix a bug where render :text could not handle yield :symbol. Fixes guides generation
2009-10-10 00:31:12 -10:00
Yehuda Katz
16a48a95e3
Fix issue with standalone ActionView
2009-10-09 00:55:00 -10:00
Yehuda Katz
2954cf1369
Avoid super in define_method for Rubinius
2009-10-09 00:54:12 -10:00
Yehuda Katz
ee37ff46e9
Get rid of constant name usage for stack trace help in favor of overriding #inspect and .name.
2009-10-09 00:53:48 -10:00
Carl Lerche
992c2db76c
Finish porting over the initializers to the app object and fix all the tests
2009-10-08 18:12:28 -07:00
Joshua Peek
3b6bdfc105
API change: content_tag_for outputs prefixed class name
2009-10-08 14:13:49 -05:00
Carl Lerche
665c7ad29d
Fix warning spew for 1.9
2009-10-08 10:58:04 -07:00
Michael Koziarski
c352ec060c
error procs have to be safe too
2009-10-08 12:13:48 +13:00
Michael Koziarski
9415935902
Switch to on-by-default XSS escaping for rails.
...
This consists of:
* String#html_safe! a method to mark a string as 'safe'
* ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it
* Calls to String#html_safe! throughout the rails helpers
* a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB)
* New ERB implementation based on erubis which uses a SafeBuffer instead of a String
Hat tip to Django for the inspiration.
2009-10-08 09:31:20 +13:00
Yehuda Katz
3916f0340e
Not calling a private method anymore
2009-10-07 00:33:13 -10:00
Yehuda Katz
e57197a967
Fix warning spew
2009-10-06 22:36:14 -10:00
Joshua Peek
b480da5cd6
Coerce all out going body parts to Strings
2009-10-05 13:58:43 -05:00
Joshua Peek
76d823677f
Revert "Revert "Fix Dispatch.new so passenger works" as it broke the build"
...
This reverts commit 49b52cadc2 .
2009-10-05 09:17:51 -05:00
Michael Koziarski
49b52cadc2
Revert "Fix Dispatch.new so passenger works" as it broke the build
...
This reverts commit c97c31b096 .
2009-10-05 17:23:37 +13:00
Joshua Peek
c97c31b096
Fix Dispatch.new so passenger works
2009-10-04 12:45:53 -05:00
Joshua Peek
86d0590022
Only draw default route once
2009-10-03 23:55:35 -05:00
Joshua Peek
86ed58d912
Use with_routing helper in tests instead of modifying global route set
2009-10-03 23:31:38 -05:00
Joshua Peek
61411f2aeb
Redraw default routes on all internal integration tests. We don't need SimpleRouteCase anymore
2009-10-03 23:18:32 -05:00
Joshua Peek
8287a112c9
Avoid creating new controller constants during test runtime. All routable controllers should be defined beforehand.
2009-10-03 23:03:08 -05:00
Joshua Peek
f5cba5e6b1
Moved shared form helper models into fake_models
2009-10-03 22:14:50 -05:00
Joshua Peek
31319b471b
NumberHelper depends on big decimal extensions
2009-10-03 22:06:25 -05:00
Joshua Peek
7eaed071a2
Changing directories during the test breaks file loading when ran by itself
2009-10-03 22:02:51 -05:00
Joshua Peek
660eb068d3
Don't load rubygems for isolated tests
2009-10-03 21:51:34 -05:00
Joshua Peek
75a2f00c97
Move improved isolated test runner to AP
2009-10-03 21:33:06 -05:00
Joshua Peek
018b79dd36
File extra test folders into controller, dispatch, or template
2009-10-03 21:05:51 -05:00
Joshua Peek
84e94551f6
Add custom "with_routing" to internal tests to fix reseting session after using
...
with_routing. This only affects our internal AP tests.
2009-10-03 20:45:49 -05:00
Carl Lerche
420004e030
Initialize a new instance of Rails.application during integration tests
...
This is to fix the AWDWR tests until the application object is refactored to be a singleton.
2009-09-30 12:39:26 -07:00
Erik Ostrom
8ffc2e3b8d
Ported the new ActionView::TestCase from 2-3-stable to master [ #3260
...
state:resolved]
The test case now mimicks the template environment more closely, so it's
possible to use render, load helper dependencies.
This also fixes assert_select, and similar assertions. Because view tests
and helpers generally don't render full templates assert_select looks
first in rendered and then in output_buffer to find the rendered output.
Additional `master'-only changes: Made the Action Pack Rakefile run the
ActionView::TestCase tests, and made ActionView::Rendering#_render_text
always return a string.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-28 13:31:30 -05:00
John Trupiano
c9318e9010
Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 days return '2 days'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3266 state:committed]
2009-09-28 14:37:31 +13:00
Jay Pignata
8ef1cd9733
Enhancing distance_of_time_in_words to prefix year output with over and about depending upon how many months have elapsed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3106 state:committed]
2009-09-28 14:36:38 +13:00
Joshua Peek
a6757a02e1
Move middleware and route configuration from AC::Dispatcher to Rails application object
2009-09-26 21:59:28 -05:00
Joshua Peek
14866fa3d8
Allow setting a default application for all integration tests
2009-09-26 21:38:48 -05:00
Joshua Peek
acfeec5151
Allow integration test rack app to be set with "@app" ivar instead of using open_session
2009-09-26 20:51:05 -05:00
Joshua Peek
02413baabb
Fix skipping memcache tests if a memcache server isn't running
2009-09-26 20:02:47 -05:00
Joshua Peek
198081a639
Remove deprecated calls to Dispatcher.to_prepare
2009-09-26 19:57:36 -05:00
Joshua Peek
1f72700575
Move default middleware stack into initializer
2009-09-26 13:41:32 -05:00
Joshua Peek
71b33ec482
AC::Dispatcher is the default app, don't need to set it
2009-09-26 13:02:34 -05:00
Joshua Peek
0c638b3406
Clean up session integration tests so they don't reference AC::Dispatcher
2009-09-26 12:56:53 -05:00
Joshua Peek
ef58194129
Move Rails::Static into ActionDispatch
2009-09-26 11:37:42 -05:00
Joshua Peek
dfbd3b9409
Extract "parse_config" into AD
2009-09-25 21:40:55 -05:00