mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Change expectation for the #strategy method in the Cleaners class
This commit is contained in:
parent
e8d2c031ea
commit
c60ce4d2c9
1 changed files with 9 additions and 8 deletions
|
@ -57,10 +57,6 @@ RSpec.describe DatabaseCleaner::Cleaners do
|
|||
context "single orm single db" do
|
||||
let!(:cleaner) { cleaners[:active_record] }
|
||||
|
||||
it "should proxy strategy" do
|
||||
expect(cleaners.strategy).to eq(cleaner.strategy)
|
||||
end
|
||||
|
||||
it "should proxy strategy=" do
|
||||
stratagem = double("stratagem")
|
||||
expect(cleaner).to receive(:strategy=).with(stratagem)
|
||||
|
@ -171,11 +167,16 @@ RSpec.describe DatabaseCleaner::Cleaners do
|
|||
})
|
||||
end
|
||||
|
||||
let(:result) do
|
||||
{
|
||||
:active_record_1 => :truncation,
|
||||
:active_record_2 => :truncation,
|
||||
:data_mapper_1 => :truncation
|
||||
}
|
||||
end
|
||||
|
||||
it "should proxy #strategy to all cleaners and return a single result" do
|
||||
expect(cleaners.strategy)
|
||||
.to eq(active_record_1.strategy)
|
||||
.and eq(active_record_2.strategy)
|
||||
.and eq(data_mapper_1.strategy)
|
||||
expect(cleaners.strategy).to eq(result)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue