Bootstrap project to run standalone Capybara against a remote application. Current version uses RSpec for tests along with Selenium plus Chrome for browser automation.
$ brew install chromedriver
$ git clone [email protected]:seanreads/capybara-solo.git
$ cd capybara-solo
$ bundle install# Create and edit your .env file
$ cp .env.example .env- Create a features directory and throw a test in there (e.g., spec/features/google_index_spec.rb).
describe "Google's home page" do
it %Q$should contain the "I'm Feeling Lucky Button"$ do
visit '/'
expect(page).to have_button(value: "I'm Feeling Lucky")
end
end- Run it:
$ rspec spec/features/google_index_spec.rb --format documentation
Google's home page
should contain the "I'm Feeling Lucky Button"
Finished in 1.29 seconds (files took 0.73299 seconds to load)
1 example, 0 failures