This repo is a basic configuration to test generic application (non rails) using the power of Capybara and Rspec. Sometimes I need to the test the behaviour of generic web application written in non Ruby languages, like Wordpress, Drupal... This repo provide a basic configuration to start writing your own tests. I use Sequel gem to maintain the persistence with the database and Dotenv gem to manage the configurations. You can see an example of .env file looking the .env.example file.
Clone the repo.
Then create and configure the .env file looking the .env.example file.
Start writing your test!
You can see an example in the models directory. Remember to configure your .env file with database configuration
Switching from Selenium to Webkit
switching is very simple, you can configure the driver in your .env file. You can see the spec_helper.rb source code to see how I have managed the driver configuration
Use Chrome (or Chromium) instead default Firefox
You can use chrome or chromium instead the default Firefox browser. You can configure the browser selection configuring the .env file
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request