Jeremy Kemper
ade756fe42
Moved encoding work in progress to a feature branch.
...
This reverts commits af0d1a8815 and 64d109e353 .
2010-05-16 13:55:29 -07:00
wycats
64d109e353
Significantly improved internal encoding heuristics and support.
...
* Default Encoding.default_internal to UTF-8
* Eliminated the use of file-wide magic comments to coerce code evaluated inside the file
* Read templates as BINARY, use default_external or template-wide magic comments
inside the Template to set the initial encoding
* This means that template handlers in Ruby 1.9 will receive Strings encoded
in default_internal (UTF-8 by default)
* Create a better Exception for encoding issues, and use it when the template
source has bytes that are not compatible with the specified encoding
* Allow template handlers to opt-into handling BINARY. If they do so, they
need to do some of their own manual encoding work
* Added a "Configuration Gotchas" section to the intro Rails Guide instructing
users to use UTF-8 for everything
* Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid
$KCODE value is used
Also:
* Fixed a few tests that were assert() rather than assert_equal() and
were caught by Minitest requiring a String for the message
* Fixed a test where an assert_select was misformed, also caught by
Minitest being more restrictive
* Fixed a test where a Rack response was returning a String rather
than an Enumerable
2010-05-16 22:44:43 +04:00
Simon Jefford
f58bdae1f7
Check blocks are not incorrectly detected when compiling erubis templates [ #4575 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 15:05:07 +02:00
rohit
fc2480a277
Fixed 1 failure and 2 errors in ActionPack testsuite [ #4613 state:commited]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 14:32:53 +02:00
Jeff Kreeftmeijer
fa99de0bd0
partial counters with :as [ #2804 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 10:32:23 -07:00
Anil Wadghule
2d84f24af5
Add tests for convenience methods #notice and #alert to flash.now [ #4369 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-15 16:52:23 +02:00
Paco Guzman
cdf700147c
fix assert_select messages to its declaration behaviour
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-15 16:31:36 +02:00
David Chelimsky
b3dcbedc67
move assert_template tests to their own test case [ #4501 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-03 13:46:34 +02:00
David Chelimsky
849ab92942
Eliminate false positives when passing symbols to assert_template
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-03 13:46:12 +02:00
David Chelimsky
91125f9927
move FixtureResolver to a file that is accessible outside Rails' own tests
...
[#4522 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
Carl Lerche
6c280f3398
RouteSet does not raise ActionController::RoutingError when no routes match anymore. Instead, it follows the X-Cascade convention. ShowExceptions checks for X-Cascade so that the routing error page can still be displayed.
2010-04-30 16:40:42 -07:00
rick
8d236ccb84
add HTTP Token Authorization support to complement Basic and Digest Authorization.
2010-04-30 07:46:30 -07:00
Neeraj Singh
d793d30776
ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [ #4468 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-29 12:48:34 +02:00
Anil Wadghule
53c13f1aca
Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [ #4477 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-26 11:12:52 -07:00
Cezary Baginski
490a3335d5
Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.
...
[#4473 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-25 17:00:20 -07:00
Jeremy Kemper
df886c4c89
Missed commit: explicit source encoding
2010-04-24 18:52:51 -07:00
José Valim
aaaa1782b4
Fix render :xml test (ht Simo Niemelä)
2010-04-24 11:48:47 +02:00
Santiago Pastorino
920df0a475
Make ActionDispatch url_for use HWIA symbolize_keys
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-22 09:06:55 -07:00
J Smith
275e839b8d
Ensure that url_for uses symbolized keys in the controller. [ #4391 ]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-22 16:47:36 +02:00
José Valim
81fb742488
Always downstream given options in :json, :xml and :js renderers and add tests for it.
2010-04-22 12:12:38 +02:00
David Chelimsky
4327ad51ab
access assigns as a method or hash, with strings or symbols [ #4431 state:resolved]
2010-04-17 15:59:10 -04:00
Santiago Pastorino
e85100da0a
Added missing require
2010-04-16 23:44:39 -03:00
Santiago Pastorino
5699de1d15
Added test get to js should have a header with content-type text/javascript
2010-04-16 11:03:16 -03:00
Santiago Pastorino
8a8da68d1f
Tidy up a bit this test file
2010-04-16 11:03:16 -03:00
Santiago Pastorino
462a7b45f6
Revert "Add test case which check content type when rendering rjs" partial in html template" rendering rjs in html doesn't make sense, it would just output javascript into the template, no script tag
...
This reverts commit dc251389d1 .
2010-04-16 11:03:16 -03:00
Santiago Pastorino and Carl Lerche
0ea434e2f4
Make perform_caching work again, with the tests passing and backward compatible
2010-04-15 18:25:08 -03:00
wycats
8e9df34fa3
Merge branch 'master' of github.com:rails/rails
2010-04-13 14:07:46 -07:00
Stanko Alexander
dc251389d1
Add test case which check content type when rendering rjs partial in html template
...
Signed-off-by: wycats <wycats@gmail.com >
2010-04-13 13:09:41 -07:00
Anil Wadghule
518891f490
Use correct RUBY_PLATFORM regex for Windows env [ #4385 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-13 12:39:03 -07:00
José Valim
ece157e950
Move verification to a plugin as well: http://github.com/rails/verification.git
2010-04-10 11:47:20 +02:00
Carl Lerche
99d5459921
Fixed that default locale templates should be used if the current locale template is missing [DHH]
2010-04-08 18:11:26 -07:00
Michael Koziarski
82514c2897
Add accessors for request and response so tests don't have to mess with internal ivars
2010-04-09 11:30:39 +12:00
Joshua Peek
570c54c39a
Fix cookie access in integration tests with other host names
2010-04-05 15:22:09 -07:00
José Valim
6690d66292
Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration.
2010-04-05 12:00:24 +02:00
wycats
ab8bf9e152
* Change the object used in routing constraints to be an instance of
...
ActionDispatch::Request rather than Rack::Request.
* Changed ActionDispatch::Request#method to return a String, to be
compatible with the Rack::Request superclass.
* Changed ActionDispatch::Request#method to return the original
method in the case of methodoverride and #request_method not to,
to be compatible with Rack::Request
2010-04-03 20:24:30 -07:00
José Valim
62151dd272
Deprecate cookie_verifier_secret in favor of config.cookie_secret allowing signed cookies to work again.
2010-03-31 12:59:41 +02:00
Joshua Peek
cdf8c35ffd
Consistent routing language
2010-03-30 14:05:42 -05:00
Joshua Peek
17f0c1e9e8
Fix stack overflow bug in integration test router helpers
2010-03-30 13:58:18 -05:00
Rizwan Reza
167017f655
Tests method_missing to raise NameError. [ #2522 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-27 00:26:44 -07:00
wycats
15c31c7639
open_session can just return the a dup of the current context.
...
At this point, its entire purpose in the open_session {} case was to
delegate back to the IntegrationTest anyway.
2010-03-22 17:14:28 -07:00
José Valim
13bb4a6e68
Current url helpers become actions in controller. Added a failing test case for it.
2010-03-22 23:57:06 +01:00
wycats
e1c030edd8
Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack response was a String.
2010-03-19 18:46:29 -07:00
José Valim
f28d856cec
Improve performance of the rendering stack by freezing formats as a sign that they shouldn't be further modified.
2010-03-19 17:20:20 +01:00
Santiago Pastorino
e629e21135
remove duplicated self.view_paths assingment on controller tests [ #4206 state:commited]
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-18 17:50:28 -07:00
Carlhuda
1dacc19702
Return a valid Rack response from bare ActionController::Metal
2010-03-18 17:32:53 -07:00
Carlhuda
edb5991a14
Make render :partial, :layout consistent between AC and AV
2010-03-18 16:55:32 -07:00
Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -07:00
Mathias Biilmann Christensen
c8dd6f224c
Deleting and setting a cookie in the same request was broken
...
Made sure to remove a cookie from @deleted_cookies when set
[#4211 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-17 18:04:32 -07:00
Carlhuda
d9375f3f30
Modify assert_template to use notifications. Also, remove ActionController::Base#template since it is no longer needed.
2010-03-17 16:29:35 -07:00
Carlhuda
6416a35f4b
Remove unneeded AV::Base and AV::Template monkey-patches
2010-03-17 14:29:18 -07:00