Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Forked from DBA/gist:858192
Created March 7, 2011 12:34
Show Gist options
  • Save dchelimsky/858446 to your computer and use it in GitHub Desktop.
Save dchelimsky/858446 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe ArticlesController, :type => :controller do
# ^^ :type => :controller is not necessary if the file is in spec/controllers
describe "GET index" do
# ^^ The describe method creates an example group. ^^
get :index
# ^^ The get method is exposed to an example.
response.should be_successful
end
end
#################
# Try this instead:
describe ArticlesController do
describe "GET index" do
it "returns a 200" do
get :index
response.should be_successful
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment