1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Guo Xiang Tan
ca83436d1b Remove assigns and assert_template. 2015-05-30 14:13:57 +08:00
Agis Anastasopoulos
a779ea9d57 Mark unused variables and make some style fixes
It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
2013-04-08 22:52:32 +03:00
Ben Woosley
8b104e2f0c Use File.join to better integrate fixture_path in fixture_file_upload. 2012-11-26 17:50:57 -06:00
AvnerCohen
d20a52930a 1.9 hash syntax changes to docs 2012-10-31 21:19:44 +02:00
Will Bryant
185c3dbc6a assigns(:foo) should not convert @foo's keys to strings if it happens to be a hash 2012-02-18 23:41:07 +13:00
José Valim
6e8fe1bf02 TestCase should respect the view_assigns API instead of pulling variables on its own. 2011-10-02 11:29:13 +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
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
Jason Dew
6b07d7f9da typo 2011-05-13 17:15:29 -07:00
Andrew White
31f09f9dbc Improve testing of cookies in functional tests:
- cookies can be set using string or symbol keys
- cookies are preserved across calls to get, post, etc.
- cookie names and values are escaped
- cookies can be cleared using @request.cookies.clear

[#6272 state:resolved]
2011-03-06 12:49:44 +00:00
David Trasbo
990f52ebd7 Make cookies hash in ActionDispatch::TestProcess indifferent access [#5761 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-07 14:48:51 -02:00
Santiago Pastorino
961aa70e4a Some require indifferent_access added
Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
2010-04-21 07:45:29 -07: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
José Valim
47a236e291 AD::TestProcess relies on request.flash, so let's load it. 2010-02-16 22:54:56 +01:00
Joshua Peek
ee395fe626 TestProcess belongs in AD 2009-12-12 18:09:44 -06:00