From 64ab548e16fdc8fa862e2b432464f3d67f5d9db8 Mon Sep 17 00:00:00 2001 From: mms Date: Tue, 19 Nov 2024 21:50:07 +0100 Subject: feat: allow for --new param --- spec/.chotto_spec.rb.swp | Bin 0 -> 12288 bytes spec/chotto_spec.rb | 5 +++++ spec/lib/.messages_spec.rb.swp | Bin 12288 -> 0 bytes spec/lib/database_spec.rb | 1 + 4 files changed, 6 insertions(+) create mode 100644 spec/.chotto_spec.rb.swp delete mode 100644 spec/lib/.messages_spec.rb.swp (limited to 'spec') diff --git a/spec/.chotto_spec.rb.swp b/spec/.chotto_spec.rb.swp new file mode 100644 index 0000000..f54f5fd Binary files /dev/null and b/spec/.chotto_spec.rb.swp differ 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') diff --git a/spec/lib/.messages_spec.rb.swp b/spec/lib/.messages_spec.rb.swp deleted file mode 100644 index 98cda14..0000000 Binary files a/spec/lib/.messages_spec.rb.swp and /dev/null differ diff --git a/spec/lib/database_spec.rb b/spec/lib/database_spec.rb index 8da04e4..8ad8d34 100644 --- a/spec/lib/database_spec.rb +++ b/spec/lib/database_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'rspec' +require 'notmuch' require_relative '../../lib/chotto/database' RSpec.describe Chotto::Database do -- cgit v1.2.3