I have a method
def index
if request.xhr?
@users = User.find( :all )
end
end
And then I have a test for it:
def test_index
user = users( :foo )
xhr :post, :index, {}, { :user_id => user.user_id }
assert_response :success
assert_template 'users/index'
end
The test works fine. If I put a puts in there it fires, so I know the
test is hitting the block in question.
So then when I run rcov, it produces a report that says the code block
has not yet been covered with a test.
I also tried xhr :get in my test but got the same result.
Anyone know anything about this? Is there a workaround, or another way?
Thanks,
--
Greg Donald
http://destiney.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---