Sha256: e0e52b6a5442c19fe7d4aecd349b890b988af54bddf0f1a108fae34487a8c6c1

Contents?: true

Size: 678 Bytes

Versions: 3

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

module DatabaseCleaner
  describe NullStrategy do
      it 'responds to .start' do
        expect { NullStrategy.start }.not_to raise_error(NoMethodError)
      end

      it 'responds to .clean' do
        expect { NullStrategy.clean }.not_to raise_error(NoMethodError)
      end

      describe '.cleaning' do
        it 'fails without a block' do
          expect { NullStrategy.cleaning }.to raise_error(LocalJumpError)
        end

        it 'no-ops with a block' do
          effect = double
          expect(effect).to receive(:occur).once

          NullStrategy.cleaning do
            effect.occur
          end
        end
      end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
database_cleaner-1.6.2 spec/database_cleaner/null_strategy_spec.rb
database_cleaner-1.6.1 spec/database_cleaner/null_strategy_spec.rb
database_cleaner-1.6.0 spec/database_cleaner/null_strategy_spec.rb