Commit 7232dfd
Changed files (2)
spec
features
spec/features/sessions_spec.rb
@@ -1,18 +1,14 @@
require "rails_helper"
feature "Sessions", type: :feature do
-
- describe "Sessions" do
- subject { LoginPage.new }
- let(:user){ create(:user,:password => "password") }
- context "credentials are correct" do
- it "takes you to your dashboard" do
- subject.visit_page
- puts page.html
- subject.login_with(user.username, "password")
- expect(current_path).to eql(dashboard_path)
- end
+ subject { LoginPage.new }
+ let(:user) { create(:user, password: "password") }
+
+ context "credentials are correct" do
+ it "takes you to your dashboard" do
+ subject.visit_page
+ subject.login_with(user.username, "password")
+ expect(current_path).to eql(dashboard_path)
end
end
-
end
spec/rails_helper.rb
@@ -26,9 +26,6 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!
-Capybara.register_driver :poltergeist do |app|
- Capybara::Poltergeist::Driver.new(app, { debug: true, js_errors: true, timeout: 60 })
-end
Capybara.javascript_driver = :poltergeist
RSpec.configure do |config|