From c2623f1aa3638c988026b28f6a4131df6c61e0c6 Mon Sep 17 00:00:00 2001 From: mms Date: Fri, 22 Nov 2024 23:35:51 +0100 Subject: feat: allow to search for thread --- spec/lib/ruleset_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/lib/ruleset_spec.rb') diff --git a/spec/lib/ruleset_spec.rb b/spec/lib/ruleset_spec.rb index e7a6904..7b77e3e 100644 --- a/spec/lib/ruleset_spec.rb +++ b/spec/lib/ruleset_spec.rb @@ -7,18 +7,19 @@ require_relative '../../lib/chotto/messages' RSpec.describe Chotto::RuleSet do let(:db) { instance_double('Chotto::Database') } let(:messages) { double('Chotto::Messages', mth: true) } + let(:only_new) { true } let(:rule) do proc do messages.mth end end let(:subject) do - Chotto::RuleSet.new('a name', db, rule) + Chotto::RuleSet.new('a name', db, only_new, rule) end describe '#run' do it 'evaluates the run block' do - expect(Chotto::Messages).to receive(:new).with(db: db).and_return(messages) + expect(Chotto::Messages).to receive(:new).with(db: db, only_new: true).and_return(messages) expect(messages).to receive(:mth) subject.run -- cgit v1.2.3