From 350ebb33effaee8a1de822ce9a3b0d177d3917db Mon Sep 17 00:00:00 2001 From: Torsten Date: Sun, 11 Dec 2022 21:44:52 +0200 Subject: [PATCH] checkpoint, playing with git gem --- config/initializers/active_file.rb | 2 +- spec/models/merged/card_spec.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config/initializers/active_file.rb b/config/initializers/active_file.rb index 0a1cede..f2fd1b0 100644 --- a/config/initializers/active_file.rb +++ b/config/initializers/active_file.rb @@ -9,7 +9,7 @@ module ActiveHash true end - def the_private_records + def self.the_private_records @records end end diff --git a/spec/models/merged/card_spec.rb b/spec/models/merged/card_spec.rb index ed617fb..a6bd0dc 100644 --- a/spec/models/merged/card_spec.rb +++ b/spec/models/merged/card_spec.rb @@ -22,5 +22,19 @@ module Merged expect(first.next_card.index).to be 2 end + it "deletes " do + card = Card.find(20) + expect(card).not_to be nil + card.delete + expect{Card.find(20) }.to raise_error(ActiveHash::RecordNotFound) + end + + it "destroys " do + Card.find(20).destroy + Card.reload + expect{Card.find(20) }.to raise_error(ActiveHash::RecordNotFound) + git = Git.open(Engine.root) + end + end end