I thought this would be simple, but I can't find how to do it.
All I want to do is write a spec that passes if a json file is returned instead of an HTML file.
This is what my test looks like right now:
require 'spec_helper' describe "sessions" do before do @program =FactoryGirl.create(:program) @user = FactoryGirl.create(:user) end describe "user" do it "is logged in" do post "/api/v1/login", user_login: {email: @user.email, password: @user.password } response.status.should be(201) # response.format.should be(:json) # Can I do something like this? end end end