Created
February 21, 2017 18:03
-
-
Save epidemian/68276425244bd40940f6bb1ea0b3915f 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
--color | |
--require spec_helper |
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
source 'https://rubygems.org' | |
gem "sinatra" | |
group :test do | |
gem "rspec" | |
gem "capybara" | |
gem "capybara-slow_finder_errors", "0.1.4" | |
gem "poltergeist" | |
end |
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 'sinatra' | |
get '/' do | |
erb '<h1>Hello World</h1>' | |
end |
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
RSpec.describe "Simple app", js: true, type: :feature do | |
it "does something" do | |
visit "/" | |
expect(page.has_content?("Goodbye World")).to be_falsy | |
end | |
end |
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_relative "../simple_app" | |
require "capybara/rspec" | |
require "capybara/poltergeist" | |
require "capybara/slow_finder_errors" | |
Capybara.app = Sinatra::Application | |
Capybara.javascript_driver = :poltergeist | |
RSpec.configure do |config| | |
config.include Capybara::DSL, type: :feature | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment