Skip to content

Instantly share code, notes, and snippets.

@orafaelfragoso
Created August 8, 2014 19:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orafaelfragoso/940adee11ccf39f4a069 to your computer and use it in GitHub Desktop.
Save orafaelfragoso/940adee11ccf39f4a069 to your computer and use it in GitHub Desktop.
Testing a root route with Rspec
require 'rails_helper'
RSpec.describe HomeController, :type => :controller do
describe "GET index" do
it "renders the :index template" do
expect(get: root_url(subdomain: nil)).to route_to(
controller: "home",
action: "index")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment