-
-
Save dchelimsky/858446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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