This project is archived and is in readonly mode.
assert_template :symbol passes whatever
Reported by Mark Dodwell | February 18th, 2009 @ 09:36 PM | in 2.x
When you use a symbol for assert_template, it passes regardless of what symbol you pass.
For example, if the actual template rendered is 'foo/new.html.erb', then the following will happen:
- assert_template 'new' -> pass
- assert_template :new -> pass
- assert_template 'newbar' -> fail
- assert_template :newbar -> pass
Is this intended behaviour, or a bug?
Thanks,
~ Mark
Comments and changes to this ticket
-
Mike Breen March 16th, 2009 @ 01:11 AM
- Tag changed from 2.3-rc1, assert_template, testunit to 2.3-rc1, assert_template, patch, testunit
The attached patch adds:
- basic tests for existing assert_template functionality
- assert_template can now accept a Symbol argument
- assert_template raises an ArgumentError if passed something other than String, Nil, Symbol or Hash
-
CancelProfileIsBroken March 16th, 2009 @ 01:37 AM
- State changed from new to open
- Assigned user set to Pratik
Patch + tests work fine for me on edge. +1
-
Pratik March 16th, 2009 @ 01:41 AM
- Should use get instead of process
- Should rebase all the commits into a single commit
Thanks
-
Mike Breen March 16th, 2009 @ 11:24 AM
- Assigned user cleared.
I've updated the patch to use get instead of process and put it into a single commit.
-
Mike Breen March 16th, 2009 @ 11:26 AM
- Assigned user set to Pratik
-
Repository May 17th, 2009 @ 06:49 PM
- State changed from open to resolved
(from [f383a4aa333cd8a99003eb1bdbb27b6fdea1056c]) Allow assert_template to take a symbol [#2011 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/f383a4aa333cd8a99003eb1bdbb27b...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 2011 assert_template :symbol passes whatever (from [f383a4aa333cd8a99003eb1bdbb27b6fdea1056c]) Allow a...