Jarl_Friis
(Jarl Friis)
1
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
Jarl_Friis
(Jarl Friis)
2
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