spec/unit/migrator_spec.rb in apartment-1.0.2 vs spec/unit/migrator_spec.rb in apartment-1.1.0
- old
+ new
@@ -4,10 +4,10 @@
describe Apartment::Migrator do
let(:tenant){ Apartment::Test.next_db }
# Don't need a real switch here, just testing behaviour
- before { Apartment::Tenant.adapter.stub(:connect_to_new) }
+ before { allow(Apartment::Tenant.adapter).to receive(:connect_to_new) }
describe "::migrate" do
it "switches and migrates" do
expect(Apartment::Tenant).to receive(:switch).with(tenant).and_call_original
expect(ActiveRecord::Migrator).to receive(:migrate)