it { should comply_with_rack_api}
it { should redirect_to "/" }
it { should respond_with :404, /We cannot find the page/ }
If the subject_attributes pattern gets implemented cleanly, maybe:
describe :post => "/users/memberships", :json => { :user_id => "foobear" } do
it { should respond_with valid_rack_response }
it { should respond_with :200, :ok }
end
Thought it might end up with something like:
describe RackEndpoint do
when_receiving :post => "/users/memberships", :json => { :user_id => "foobear" } do
it { should respond_with valid_rack_response }
it { should respond_with :200, :ok }
end
end
So some sample Rack macros:
If the subject_attributes pattern gets implemented cleanly, maybe:
Thought it might end up with something like:
(to avoid having to wrap around describe)