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