aboutsummaryrefslogtreecommitdiff
path: root/spec/chotto_spec.rb
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-11-19 21:50:07 +0100
committermms <git@sapka.me>2024-11-19 21:50:07 +0100
commit64ab548e16fdc8fa862e2b432464f3d67f5d9db8 (patch)
tree75c8e273d47eb54af67da5c6299876601f054e93 /spec/chotto_spec.rb
parent8004fd7f9fc91ce9ec02b1b8e8eac639b17d0eb8 (diff)
feat: allow for --new param
Diffstat (limited to 'spec/chotto_spec.rb')
-rw-r--r--spec/chotto_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/chotto_spec.rb b/spec/chotto_spec.rb
index 9e8650b..41d949c 100644
--- a/spec/chotto_spec.rb
+++ b/spec/chotto_spec.rb
@@ -12,6 +12,7 @@ describe Chotto do
before do
$db_double = db_double # we need to access this double within block evaled elsewhere
+ p $db_double
allow(db_double).to receive(:new).with('/path', mode: Notmuch::MODE_READ_WRITE).and_return(db_instance_double)
allow(db_instance_double).to receive(:query).with(' (from:baltar@galactica.com)').and_return(db_query_double)
@@ -30,6 +31,10 @@ describe Chotto do
end
end
+ after do
+ Chotto.force_fresh_config
+ end
+
it 'sends the rules to Notmuch - scenario 1' do
expect(message_double).to receive(:tags).and_return([])
expect(message_double).to receive(:header).with('Subject').and_return('Number Six')