EugenePetrik / ruby_rspec_capybara_webinar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project has been prepared for the webinar.

We use the following tools, such as Ruby, Capybara, and RSpec.

Install rvm Ubuntu

Ubuntu rvm

Install rvm Mac

Mac rvm

Install Ruby 2.6.5

rvm install 2.6.5
rvm --default use 2.6.5
rvm list
ruby -v

Install bundler

gem install bundler

Install gems

bundle install

Run Rubocop

rubocop

Run Rubocop with auto refactoring

rubocop -a

Setup RSpec

rspec --init

Run all spec files

rspec

Run all spec files in a single directory

rspec spec/features

Run a single spec file

rspec spec/features/welcome_page_spec.rb

Run a single example from a spec file (by line number)

rspec spec/features/key_presses_spec.rb:18

Run all specs with the 'smoke' tag

rspec spec/features/ --tag smoke

Run specs with the 'smoke' and 'regression' tags

rspec spec/features/tags_spec.rb --tag smoke --tag regression

Run specs with the 'regression' tag and exclude spec with the 'smoke' tag

rspec spec/features/tags_spec.rb --tag ~@smoke --tag regression

Useful links

Capybara Cheat Sheet #1

Capybara Cheat Sheet #2

RSpec Docs

RSpec Expectations

Filter specs with a tag option

Rubocop Tests Naming

FFaker reference

About


Languages

Language:Ruby 100.0%