From 64c0424f40c1625c0a7e6b70be4597c981329b98 Mon Sep 17 00:00:00 2001 From: Micah Geisel Date: Sat, 9 May 2020 10:46:14 -0700 Subject: [PATCH] get code coverage to 100%! --- spec/database_cleaner/strategy_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spec/database_cleaner/strategy_spec.rb diff --git a/spec/database_cleaner/strategy_spec.rb b/spec/database_cleaner/strategy_spec.rb new file mode 100644 index 0000000..f78853a --- /dev/null +++ b/spec/database_cleaner/strategy_spec.rb @@ -0,0 +1,14 @@ +require "database_cleaner/strategy" + +RSpec.describe DatabaseCleaner::Strategy do + describe "default implementation" do + it "does not provide a default implementation for #clean" do + expect { described_class.new.clean }.to raise_exception(NotImplementedError) + end + + it "rejects options" do + expect { described_class.new(only: %w[a b c]) }.to \ + raise_exception(ArgumentError, "No options are available for the Strategy strategy.") + end + end +end