Commit Graph

16417 Commits

Author SHA1 Message Date
Neeraj Singh
ce20b93606 assert_equal should be used instead of assert
[#4629 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 16:13:00 +02:00
Neeraj Singh
0ef13afef5 expected value should come first in assert_equal
[#4630 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 16:13:00 +02:00
Neeraj Singh
d00afeaeed Use assert_equal correctly in actionmailer test (exposing one as broken)
[#4626 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 16:12:59 +02:00
Neeraj Singh
0dab076a08 Better error messages for some of ActiveSupport tests
[#4635 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 16:12:59 +02:00
Neeraj Singh
c00f8e49ad assert should be replaced with assert_equal in a particular test case
[#4636 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 16:12:59 +02:00
Pratik Naik
5ddc904941 Remove Model.clear_default_scope 2010-05-18 12:22:23 +01:00
José Valim
c536835957 Cut the fat and make session stores rely on request.cookie_jar and change set_session semantics to return the cookie value instead of a boolean. 2010-05-18 03:18:23 +02:00
rohit
8e3c3b06dc Fixed numericality validator in ActiveModel to reject hex numbers for floats completely [#4622 state:commited]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 03:10:56 +02:00
rohit
05e3fb45ee Add a valid hex that shouldn't be valid to ActiveModel numericality tests [#4622 state:commited]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 03:10:55 +02:00
Neeraj Singh
73f0e1a842 Use assert_respond_to because it has better error messaging
[#4628 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 02:12:06 +02:00
José Valim
26e645fa00 Remove deprecated methods since 2-3-stable. 2010-05-18 02:11:50 +02:00
José Valim
0c3cde404a Kill legacy dispatcher. 2010-05-18 02:07:59 +02:00
José Valim
25f7c030e4 Simplify cookie_store by simply relying on cookies.signed. 2010-05-18 02:05:20 +02:00
José Valim
941b653627 Rely on set and delete cookie logic from rack. 2010-05-18 01:51:45 +02:00
Rizwan Reza
8c5e1652c7 Renames Array#rand -> Array#random_element
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-05-17 23:03:16 +02:00
wycats
f09d8f3e68 Merge remote branch 'origin/master' 2010-05-17 19:51:30 +04:00
wycats
c3b7471c69 Merge branch 'encodings' 2010-05-17 19:42:00 +04:00
wycats
80b60671f7 Revert "Moved encoding work in progress to a feature branch."
This reverts commit ade756fe42.
2010-05-17 19:41:54 +04:00
wycats
02c36cf5cb Make sure encoding changes don't break 1.8 2010-05-17 19:39:38 +04:00
Santiago Pastorino
c7e6777961 Added default currency values to NumberHelper and pass them to I18n.translate
[#4604 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-17 17:39:33 +02:00
José Valim
107c6381a0 Allow root to be given in the resources scope without need to specify :on => collection. 2010-05-17 17:39:32 +02:00
Jeremy Kemper
5371242384 Valid hex strings aren't valid float column values, to match the integer restriction. [#4622 state:resolved] 2010-05-17 07:58:26 -07:00
Paco Guzman
c2fb8afaa0 Use assert_equal correctly in transaction callback tests (exposing some of them as broken)
[#4612]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-17 07:16:53 -07:00
Jeremy Kemper
a06e9b4602 Ruby 1.9: helper path may be a pathname, so convert to a string before quoting for regexp 2010-05-16 18:03:27 -07:00
pleax
4db10bce7b AR::Base#clone fixed to set dirty bits for cloned object
[#2919 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-16 17:45:12 -07:00
Comron Sattari
e1a340a91d cache connection when quoting
[#3642 state:committed]

Signed-off-by: Marius Nuennerich <marius@nuenneri.ch>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-16 17:40:40 -07:00
Federico Brubacher
6b4e0cc526 a cloned object no longer mimics changed flags from creator , plus a test case [#4614 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 23:04:40 +02:00
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
Santiago Pastorino
821e15e5f2 Change on Array extension from rand => random_element [#4555 state:committed]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-05-16 22:23:44 +02: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
wycats
af0d1a8815 Initial work to improve the state of encodings for templates 2010-05-16 22:43:35 +04:00
Priit Tamboom
f8432108e8 Added nokogiri dependency to Gemfile [#4617 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 20:33:46 +02:00
Nobuhiro IMAI
5d0afe75eb prevent to run fixture accessor (e.g. test_foos for TestFoo model) as a test case [#2992 state:resolved]
Signed-off-by: Wijnand Wiersma <wijnand@videre.net>
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 20:14:36 +02:00
Santiago Pastorino
9ef232a785 Gemfile requires sqlite3-ruby = 1.3.0.beta.2
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-05-16 19:48:05 +02:00
Simon Jefford
7be58b6163 Tests for new reserved words [#4602 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 19:15:24 +02:00
Aleksandr Koss
b7bdacf1ab Added rails command aliases (s g c db) to reserved words in app generator [#4602 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 19:15:01 +02:00
Franck Verrot
621ee373cb I have updated the documentation according to ticket #4263 about fixtures and set_fixture_class
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 18:04:31 +02:00
Rizwan Reza
d61dbce482 Take out stale tasks from Actionpack's Rakefile [#4619 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 17:49:33 +02:00
Rizwan Reza
6c69221985 Takes out stale methods relating to edge_rails_version
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 17:21:29 +02:00
Santiago Pastorino
fa5f93698d Added missing require, we are using bind method defined on active_support/core_ext/proc
[#4610 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 16:16:15 +02:00
Santiago Pastorino
fdfebb7782 Make use of assert_equal to test equallity between object assert expects and object and a message of error
[#4611 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 16:06:28 +02:00
Wijnand Wiersma
d7a3e65c50 Postgresql doesn't allow to change a string type column to a binary type. Skip this test for postgresql for now. [#4616 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 15:15:43 +02: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
Hussein Morsy
4ea48f2a98 Fixed 1 failure in ActionPack testsuite [#4613 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 15:00:35 +02:00
José Valim
6cabc9a61f Add some comments related to Hash method check. 2010-05-16 14:34:36 +02:00
pleax
2dc1402417 added support for html attributes in options_for_select [#2165]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 14:33:04 +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
Aleksandr Koss
3e84ea014e Fix Hash#index deprecated warning in 1.9.x [#4600 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 14:32:48 +02:00
José Valim
1a2d556de7 Rename assert_attribute_type to asser_field_type. 2010-05-16 12:07:44 +02:00
Jeff Kreeftmeijer
5ff6de0982 Added assert_attribute_type to clean up GeneratedAttributeTest [#2377 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 12:07:22 +02:00