diff options
author | mms <git@sapka.me> | 2024-11-22 23:35:51 +0100 |
---|---|---|
committer | mms <git@sapka.me> | 2024-11-22 23:37:42 +0100 |
commit | c2623f1aa3638c988026b28f6a4131df6c61e0c6 (patch) | |
tree | c9a685d2997214bcb90f3659febc56f7ac85cbbb /spec/lib/ruleset_spec.rb | |
parent | 64ab548e16fdc8fa862e2b432464f3d67f5d9db8 (diff) |
feat: allow to search for thread
Diffstat (limited to 'spec/lib/ruleset_spec.rb')
-rw-r--r-- | spec/lib/ruleset_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |