No release in over a year
This gem provides a RSpec matcher make_redis_queries.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.13
~> 3.9
 Project Readme

How to use this gem?

Latest gem is released at RubyGems.org

Option 1: Add it to your Gemfile and run bundle install

# Gemfile, preferably in your `test` group:

gem "redis_query_matcher"

Option 2:

gem install redis_query_matcher

What does it do?

  • This gem provides a RSpec matcher make_redis_queries.

Usage Example

describe 'MyCode' do
  context 'when we expect 0 redis queries' do
    it 'does not make redis queries' do
      expect { subject.make_no_queries }.to make_redis_queries(0)
    end
  end

  context 'when we expect 5 redis queries' do
    it 'makes database queries' do
      expect { subject.make_some_queries }.to make_redis_queries(5)
    end
  end
end