Commit Graph

64 Commits

Author SHA1 Message Date
Aaron Patterson
47147a0555 Merge pull request #5456 from brianmario/redirect-sanitization
Strip null bytes from Location header
2012-03-15 14:58:49 -07:00
Andrew Kaspick
05d4d8b9a2 fix assert_select_email to work on non-multipart emails as well as converting the Mail::Body to a string to prevent errors. 2011-09-07 17:15:58 -05:00
wycats
63467a4301 Restructure TemplateAssertions-related code to eliminate circular requires.
Also, no need to include dependencies in AS::Concerns inside included blocks.
2011-06-04 08:57:56 +05:30
Sebastian Martinez
ab880b9eb0 Follow code conventions on docs 2011-05-10 20:55:31 -03:00
David Heinemeier Hansson
b29a905f94 Flunk makes a lot more sense, doesnt it (hat tip @tenderlove) 2011-05-02 17:04:21 -05:00
David Heinemeier Hansson
89f315bfb2 We cant use assert_block because its buggy in MiniTest and wont actually show you the failure message you provide -- instead you just always get a "Expected block to return true" 2011-04-22 19:38:01 +02:00
Prem Sichanugrist
733bfa63f5 Remove #among? from Active Support
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.

It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
Xavier Noria
acdbc6ae41 renames response_from_page_or_rjs -> response_from_page, and extracts the RJS in it 2011-04-13 13:24:33 +02:00
Xavier Noria
b878757c50 removes assert_select_rjs 2011-04-13 13:23:16 +02:00
David Heinemeier Hansson
d1575ae1b9 Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion! 2011-04-12 00:23:07 +02:00
Prem Sichanugrist
a9f3c9da01 Using Object#in? and Object#either? in various places
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Aaron Patterson
58c3ec1b7b use assert_equal so we get normal error messages along with our custom failure message 2011-03-30 15:29:52 -07:00
Andrew White
af4fab7d2e Remove incorrect assert_recognizes example 2011-02-13 23:25:57 +00:00
Andrew White
385be358cf Fix assert_recognizes with block constraints [#5805 state:resolved] 2011-02-13 23:24:46 +00:00
misfo
ef48408a7b corrected the location of status code symbols 2011-01-29 16:03:40 -06:00
Emilio Tagua
c37800aae1 _ is not a valid scheme name character, \w includes it and also is redundant with \d.
'The scheme name consists of a letter followed by any combination of letters, digits, and the plus ("+"), period ("."), or hyphen ("-") characters; and is terminated by a colon (":").'
2010-09-29 12:55:43 -03:00
Emilio Tagua
8823b85010 Remove redundant conditional. 2010-09-29 12:42:51 -03:00
Emilio Tagua
523f98099d Remove more warnings on AP. 2010-09-28 18:01:48 -03:00
Emilio Tagua
059d609a1a Avoid more uninitialized variable warnings. 2010-09-28 15:46:30 -03:00
Emilio Tagua
adcc5e11fe @selected may not be defined here, avoid warning. 2010-09-28 15:29:40 -03:00
Emilio Tagua
1ab2ab07b5 Remove more warnings shadowing outer local variable.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-27 16:43:17 -03:00
Emilio Tagua
50decfbc0e _routes must be inside @controller conditional. 2010-09-27 11:19:24 -03:00
Emilio Tagua
c2940a6bf4 Refactor method to avoid warnings and not run unnecessary code. 2010-09-27 11:19:24 -03:00
Emilio Tagua
583ddf22a2 Remove more warnings shadowing outer local variable. 2010-09-27 11:19:22 -03:00
Emilio Tagua
24ef32fe93 Ask is @controller is defined to avoid warning. 2010-09-27 11:19:21 -03:00
Joost Baaij
4b14de72e1 The call-seq directive has no useful effect on our documentation and is not used anywhere else.
Worse still, its use breaks some rdoc, replacing method names with a curly brace.
Having just one call-seq directive doesn't add anything since this is covered by regular rdoc.
Having multiple might make sense, but these are already documented with examples.

This partly re-reverts 60de0e56b7 but does not
touch the vendorized code in html-scanner.
2010-08-28 00:50:50 +02:00
Xavier Noria
27d42a56b9 Revert "call-seq directive makes rdoc cry and replaces method names with a curly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already"
Reason: Part of this commit touches vendorized stuff, the rest is fine, could you please repatch?

This reverts commit 60de0e56b7.
2010-08-27 23:30:52 +02:00
Joost Baaij
4a56f8f314 escape constants that should not be linked to 2010-08-27 22:47:11 +02:00
Joost Baaij
60de0e56b7 call-seq directive makes rdoc cry and replaces method names with a curly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already 2010-08-27 22:20:53 +02:00
Andrew White
7c9bf45b0d Support routing constraints in functional tests
Extend assert_recognizes and assert_generates to support passing
full urls as the path argument. This allows testing of routing
constraints such as subdomain and host within functional tests.

[#5005 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-20 14:51:25 -03:00
José Valim
c3c349ec3e Remove assert_valid. It was already deprecated on Rails 2.3. 2010-07-19 22:35:17 +02:00
Paco Guzman
ec37452f68 Remove unused variable on assert_recognizes [#4912 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 17:37:18 +02:00
Josh Kalderimis
dad71c6099 removed 'unless const_defined?' code smell
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 23:34:45 +02:00
Evgeniy Dolzhenko
ccf9577aee Fix a bunch of minor spelling mistakes 2010-06-11 14:15:34 +04:00
wycats
d6953cbfd3 regular expressions are usually ASCII-encoded, so force_encoding the content of a Node to the encoding of the regular expression is wrong. 2010-06-07 18:06:08 -04: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
Santiago Pastorino
961aa70e4a Some require indifferent_access added
Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
2010-04-21 07:45:29 -07: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
Carlhuda
a5d80f84d2 Each controller class has it's own view context subclass. This removes the need for ActionView::Base.for_controller 2010-03-18 18:14:54 -07:00
Carlhuda
71c9337f45 All tests pass without memoizing view_context 2010-03-18 15:52:43 -07:00
Carlhuda
947f86c699 Modify assert_template to use instrumentation 2010-03-17 14:29:18 -07:00
Carl Lerche
23b6def0eb Do not always include the named URL helpers into AC::Base and AV::Base. 2010-03-16 15:47:49 -07:00
Jeremy Kemper
9f83cdc38e No longer add missing leading / on path args to assert_redirected_to. Deprecated in 2.3.6. 2010-03-02 14:16:25 -08:00
Yehuda Katz
3f0ed205e7 Remind us that RoutingAssertions should work in an integration context 2010-02-26 22:47:36 -08:00
Carlhuda
ab0cc7286f Setting UrlFor in with_routing is no longer needed now that it's not global 2010-02-26 15:56:38 -08:00
Carlhuda
98f77e0827 Rename named_url_helpers to url_helpers and url_helpers to url_for 2010-02-26 15:04:50 -08:00
Carlhuda
f863045c45 Rename metaclass to singleton_class 2010-02-25 17:56:58 -08:00
Carlhuda
fc4582fb66 Final pass at removing the router from a global constant 2010-02-25 17:53:29 -08:00
Carlhuda
226dfc2681 WIP: Remove the global router 2010-02-25 17:53:00 -08:00