diff options
Diffstat (limited to 'spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb')
-rw-r--r-- | spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb b/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb index 6d8d9ba0754..67d87fe3c2f 100644 --- a/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb +++ b/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb @@ -225,6 +225,16 @@ RSpec.describe ExceedQueryLimitHelpers do expect(test_matcher.actual_count).to eq(2) end + it 'can filter specific models' do + test_matcher = TestMatcher.new.for_model(TestQueries) + test_matcher.verify_count do + TestQueries.first + TestQueries.connection.execute('select 1') + end + + expect(test_matcher.actual_count).to eq(1) + end + it 'can ignore specific queries' do test_matcher = TestMatcher.new.ignoring(/foobar/) test_matcher.verify_count do |