Sha256: 54e74f25c214be8ad2c5154a4546ce0c81458c8d275433726c90b00feab5883c

Contents?: true

Size: 690 Bytes

Versions: 5

Compression:

Stored size: 690 Bytes

Contents

require "database_cleaner/cleaner"

RSpec.shared_examples_for "a database_cleaner strategy" do
  it { is_expected.to respond_to(:db)  }
  it { is_expected.to respond_to(:db=)  }
  it { is_expected.to respond_to(:start) }
  it { is_expected.to respond_to(:clean) }
  it { is_expected.to respond_to(:cleaning) }
end

RSpec.shared_examples_for "a database_cleaner adapter" do
  describe 'all strategies should adhere to a database_cleaner strategy interface' do
    DatabaseCleaner::Cleaner.available_strategies(described_class).each do |strategy|
      subject { described_class.const_get(strategy.to_s.capitalize).new }

      it_behaves_like 'a database_cleaner strategy'
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/database_cleaner-core-2.0.1/lib/database_cleaner/spec/shared_examples.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/database_cleaner-core-2.0.1/lib/database_cleaner/spec/shared_examples.rb
database_cleaner-core-2.0.1 lib/database_cleaner/spec/shared_examples.rb
database_cleaner-core-2.0.0 lib/database_cleaner/spec/shared_examples.rb
database_cleaner-core-2.0.0.beta2 lib/database_cleaner/spec/shared_examples.rb