Hi.
I am trying to use the extras hash parameter in assert_recognizes. I
am using.
assert_recognizes(expected_options, path, extras={}, message=nil)
I have something similar to the documentation:
assert_recognizes {:controller => ''items'', :action =>
''list'', :id => ''1'', :view =>
''print''}, ''items/list/1'', { :view =>
"print" }
this works fine, the test passes, however. If I write like this
assert_recognizes {:controller => ''items'', :action =>
''list'', :id => ''1'', :view =>
''BULLSHIT''}, ''items/list/1'', { :view =>
"print" }
The test also passes, which worries me a lot, I would expect it to
fail.
To me it looks like a bug in assert_recognizes, it ignores the
additional ''view'' option value in the extras hash parameter.
Jarl
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.
Jarl Friis <jarl@gavia.dk> writes:> Hi. > > I am trying to use the extras hash parameter in assert_recognizes. I > am using. > > assert_recognizes(expected_options, path, extras={}, message=nil) > > I have something similar to the documentation: > > assert_recognizes {:controller => ''items'', :action => ''list'', :id => ''1'', :view => ''print''}, ''items/list/1'', { :view => "print" } > > this works fine, the test passes, however. If I write like this > > assert_recognizes {:controller => ''items'', :action => ''list'', :id => ''1'', :view => ''BULLSHIT''}, ''items/list/1'', { :view => "print" } > > The test also passes, which worries me a lot, I would expect it to > fail. > > To me it looks like a bug in assert_recognizes, it ignores the > additional ''view'' option value in the extras hash parameter.I have created bug #4019 for this problem. Jarl -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.