Setting up/ Configuring Flashcards

1
Q

How do you configure Shoulda Matchers gem?

A
Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :rspec
    with.library :rails
  end
end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you set up RSpec for your Rails app?

A
  1. add ‘rspec-rails’ in gemfile
  2. run in terminal: rails g rspec:install
  3. in rspec file:
    - -require spec_helper
    - -format documentation
    - -color
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you set up Cucumber for your Rails app?

A
  1. add gem in gemfile

2. run in terminal: rails g cucumber:install

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you set up coveralls from your Rails app?

A
  1. add ‘coveralls’ gem in gemfile
  2. make a file in lib tasks called ci.rake
  3. Add the following code:
    unless Rails.env.production?
    require ‘rspec/core/rake_task’
    require ‘coveralls/rake/task’Coveralls::RakeTask.newnamespace :ci do
    task tests: [:spec, ‘coveralls:push’]
    end

end
4. Add the following to the very top of spec_helper:
require ‘coveralls’
Coveralls.wear_merged!(‘rails’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly