diff options
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 |