search for: my_friends_path

Displaying 1 result from an estimated 1 matches for "my_friends_path".

2012 Jul 12
0
Set requests' header inside spec/routing
...to this excellent Ryan''s cast: http://railscasts.com/episodes/350-rest-api-versioning). For instance, there is a spec/requests spec: require ''spec_helper'' describe "My Friends" do describe "GET /my/friends.json" do it "should get my_friends_path" do get v1_my_friends_path, {}, {''HTTP_ACCEPT'' => ''application/vnd.myapp+json; level=1''} response.status.should be(401) end end end And it works well. But (keeping this example) how can we write the routing spec? For instance...