Skip to content

Instantly share code, notes, and snippets.

@mbajur
Last active December 31, 2015 14:48
Show Gist options
  • Save mbajur/8002303 to your computer and use it in GitHub Desktop.
Save mbajur/8002303 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "Events", type: :controller do
before(:each) do
FactoryGirl.create(:user)
visit '/users/sign_in'
fill_in 'Email', with: User.last.email
fill_in 'Password', with: 'TestPass666'
click_button 'Sign in'
end
describe "GET /events" do
it "works! (now write some real specs)" do
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
get events_path
expect(response.status).to be(200)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment