Testing with RSpec¶
RSpec is used for unit testing in Ruby.
RSpec comes as a set of gems, install the gem :
gem install rspec
Start using RSpec¶
You can using RSpec by initializing it as follows :
Run this from the same folder with your code. Now we can run the
rspec command line tool.
RSpec uses the
it keywords when writing specs.
RSpec.describe 'first test' do it 'passes' do true end end