Commit Graph

978 Commits

Author SHA1 Message Date
Hendy Tanata
193e4de206 Better formatting of route requirements in rake:routes.
Previously it was:

    {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/}

Now it becomes:

    photos#show {:id=>/[A-Z]\d{5}/}
2011-07-16 04:23:05 +08:00
Vishnu Atrai
525fd3ac86 TODO fix explicitly loading exceptations, autoload removed 2011-07-11 13:14:02 +05:30
Damien Mathieu
ac15bcebf2 provide a more explicit message when using url_for with nil
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
2011-07-02 18:53:54 +02:00
José Valim
f34f0b7e08 Add has_key? and key? methods to CookieJar removed in 0ca69ca65f 2011-06-30 08:01:53 -03:00
Aaron Patterson
1d43409d32 Revert "Delegate to @flashes with 'delegate' instead of manually."
This reverts commit 701e8554a8.
2011-06-29 13:52:44 -07:00
Ben Orenstein
701e8554a8 Delegate to @flashes with 'delegate' instead of manually. 2011-06-29 15:16:57 -04:00
Arun Agrawal
1b957177e7 Fix test to use Mime::Zip 2011-06-28 16:51:19 +05:30
Esad Hajdarevic
d73269ba53 Register some commonly used mime types (png, jpeg, pdf, zip etc.) per default 2011-06-28 06:56:47 +02:00
David Chelimsky
a7af1e0051 Get the fixture_path from self.class instead of ActiveSupport::TestCase.
This allows test classes that are not subclasses of
ActiveSupport::TestCase (like those in rspec-rails) to interact with
with this variable without having to reference ActiveSupport::TestCase.
2011-06-25 13:59:49 -05:00
José Valim
f2c0fb32c0 Remove usage of memoizable from ActionPack. 2011-06-16 08:01:35 -03:00
Wen-Tien Chang
d7aac1f1e4 Also change the default route comment 2011-06-16 14:03:41 +08:00
bagwanpankaj
c424fb29ab Removed warning while running test with ruby 1.9.2 2011-06-14 21:56:27 +05:30
Damien Mathieu
383fd143bf all requests are utf-8. Don't use the external encoding. 2011-06-14 17:01:33 +02:00
Damien Mathieu
383d56b5ee encode the uploaded file's name in the default external encoding - Closes #869 2011-06-14 14:34:30 +02:00
Xavier Noria
4699c93301 Merge branch 'master' of git://github.com/lifo/docrails 2011-06-11 00:59:46 +02:00
Xavier Noria
90c4885766 Merge pull request #1523 from raghunadhd/refactor_regex
rafactored the regex related code in the mapper class
2011-06-10 03:27:45 -07:00
ganesh
262a42b12e shallow_path example updated 2011-06-10 15:53:55 +05:30
Raghunadh
46ecb53fc2 removed the unnecessary back slashes from the regular expression 2011-06-10 13:39:24 +05:30
Santiago Pastorino
1d3618a9b4 remove warning: assigned but unused variable 2011-06-08 00:26:09 -03:00
Raghunadh
2e07c71106 rafactored the regex related code in the mapper class 2011-06-07 19:02:08 +05:30
Andrew White
e864ff7259 Add backward compatibility for testing cookies
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:

    @request.env['HTTP_COOKIE'] = 'user_name=david'
    get :index
    assert_equal 'david', cookies[:user_name]

and

    @request.cookies[:user_name] = 'david'
    get :index
    assert_equal 'david', cookies[:user_name]

Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
2011-06-05 12:34:27 +01:00
Andrew White
0a9270417c Ensure cookie keys are strings 2011-06-05 12:03:31 +01:00
Andrew White
a50865c7dc Add missing require for cookies middleware 2011-06-04 09:35:48 +01:00
Andrew White
d4658d86fe Refactor ActionController::TestCase cookies
Assigning cookies for test cases should now use cookies[], e.g:

  cookies[:email] = 'user@example.com'
  get :index
  assert_equal 'user@example.com', cookies[:email]

To clear the cookies, use clear, e.g:

  cookies.clear
  get :index
  assert_nil cookies[:email]

We now no longer write out HTTP_COOKIE and the cookie jar is
persistent between requests so if you need to manipulate the environment
for your test you need to do it before the cookie jar is created.
2011-06-04 07:09:11 +01:00
Damien Mathieu
8a0ffa7c95 fix creating an empty route on 1.8. Closes #1210 2011-06-01 15:51:36 +02:00
Lee Reilly
4f234bfd79 Corrected some typos and American vs. Queen's English issues 2011-05-29 12:40:24 -07:00
Xavier Noria
00e1d0832e Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	actionmailer/lib/action_mailer/base.rb
	activesupport/lib/active_support/core_ext/kernel/requires.rb
2011-05-25 22:48:47 +02:00
Josh Kalderimis
d182b6ee9c removed deprecated methods, and related tests, from ActionPack 2011-05-24 23:38:59 +02:00
Sebastian Martinez
05f29ca2c9 Remove extra white-space on some exception messages. 2011-05-23 20:53:18 -03:00
Sebastian Martinez
fcdb5dc557 Remove extra white spaces on ActionPack docs. 2011-05-23 20:22:33 -03:00
Jon Leighton
d411c85a65 Replace references to ActiveSupport::SecureRandom with just SecureRandom, and require 'securerandom' from the stdlib when active support is required. 2011-05-23 20:25:44 +01:00
wycats
ddc584e89e Restructure TemplateAssertions-related code to eliminate circular requires.
Also, no need to include dependencies in AS::Concerns inside included blocks.
2011-05-22 23:13:44 -07:00
wycats
0afefa9504 Make :status an attr_reader to avoid unnecessary warning when replacing status= 2011-05-22 22:34:06 -07:00
Anuj Dutta
023ca4fd48 Fixed documentation for scope with path. 2011-05-22 11:27:02 +01:00
Andrew White
89d7133082 Correct example and expand on description of :shallow option for resources 2011-05-21 07:11:47 +01:00
Diego Plentz
0d310d590c fixes code highlight in shallow_path example 2011-05-19 17:38:15 -07:00
steve
7c000af867 fixing sym and string cookie name, two cookies to browser bug. 2011-05-19 09:49:16 -04:00
José Valim
324f1451b0 Dump and load rack-cache stuff. 2011-05-17 17:33:17 -04:00
Jeremy Kemper
b77e032ccf Merge pull request #247 from goncalossilva/performance_test
Performance tests improved
2011-05-17 14:28:40 -07:00
Xavier Noria
d491130236 Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	actionpack/lib/action_view/helpers/date_helper.rb
	railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
2011-05-14 11:21:27 +02:00
Xavier Noria
e5524d538c minor edits after going through what's new in docrails 2011-05-14 11:15:43 +02:00
Jason Dew
6b07d7f9da typo 2011-05-13 17:15:29 -07:00
Sebastian Martinez
ab880b9eb0 Follow code conventions on docs 2011-05-10 20:55:31 -03:00
José Valim
3aa8f348ef Fix previous commit by allowing a proc to be given as response_body. This is deprecated and is going to be removed in future releases. 2011-05-10 16:53:57 +02:00
James Miller
bb1af05247 Missing an end in routing docs 2011-05-09 18:46:07 -07:00
Sebastian Martinez
ed8962c821 more fixed-fonts here 2011-05-09 22:21:00 -03:00
Sebastian Martinez
56a7db6ea8 added some fixed fonts 2011-05-09 22:06:04 -03:00
José Valim
80bf68aa1b prepend the assets route instead of appending, closes #436 2011-05-08 12:59:04 +02:00
Gonçalo Silva
aec7456f81 Merge branch 'master' of https://github.com/rails/rails into performance_test
Conflicts:
	activesupport/lib/active_support/testing/performance.rb
2011-05-08 03:54:55 +01:00
José Valim
0e5adbceb7 Don't pluralize, camelize. 2011-05-06 17:00:59 +02:00