Skip to content

Commit

Permalink
Add shared example for database_cleaner adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSmartnik committed Mar 5, 2020
1 parent 101aaf1 commit 0801c23
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/database_cleaner/spec/shared_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
it { is_expected.to respond_to(:clean) }
it { is_expected.to respond_to(:cleaning) }
end

RSpec.shared_examples_for "a database_cleaner adapter" do
it { expect(described_class).to respond_to(:available_strategies) }
it { expect(described_class).to respond_to(:default_strategy) }

it 'default_strategy should be part of available_strategies' do
expect(described_class.available_strategies).to include(described_class.default_strategy)
end
end

0 comments on commit 0801c23

Please sign in to comment.