I'm just dipping my toes into Ruby and Rails and trying to get my head the whole BDD thing. I have a page that does an AJAX POST back to a controller that has a method called "sort" and passes along an array of id's like this

["song-section-5", "song-section-4", "song-section-6"]

I want to write a test for this so I came up with something like this:

test "should sort items" do
  xhr :post, :sort
end

But can't figure out how to pass along the array. Any help?

Edit
Report