spec/unit/migrator_spec.rb in apartment-0.26.1 vs spec/unit/migrator_spec.rb in apartment-1.0.0
- old
+ new
@@ -7,31 +7,31 @@
# Don't need a real switch here, just testing behaviour
before { Apartment::Tenant.adapter.stub(:connect_to_new) }
describe "::migrate" do
- it "processes and migrates" do
- expect(Apartment::Tenant).to receive(:process).with(tenant).and_call_original
+ it "switches and migrates" do
+ expect(Apartment::Tenant).to receive(:switch).with(tenant).and_call_original
expect(ActiveRecord::Migrator).to receive(:migrate)
Apartment::Migrator.migrate(tenant)
end
end
describe "::run" do
- it "processes and runs" do
- expect(Apartment::Tenant).to receive(:process).with(tenant).and_call_original
+ it "switches and runs" do
+ expect(Apartment::Tenant).to receive(:switch).with(tenant).and_call_original
expect(ActiveRecord::Migrator).to receive(:run).with(:up, anything, 1234)
Apartment::Migrator.run(:up, tenant, 1234)
end
end
describe "::rollback" do
- it "processes and rolls back" do
- expect(Apartment::Tenant).to receive(:process).with(tenant).and_call_original
+ it "switches and rolls back" do
+ expect(Apartment::Tenant).to receive(:switch).with(tenant).and_call_original
expect(ActiveRecord::Migrator).to receive(:rollback).with(anything, 2)
Apartment::Migrator.rollback(tenant, 2)
end
end
-end
\ No newline at end of file
+end