spec/integration/slices/slice_loading_spec.rb in hanami-2.0.0.beta4 vs spec/integration/slices/slice_loading_spec.rb in hanami-2.0.0.rc1
- old
+ new
@@ -1,11 +1,11 @@
# frozen_string_literal: true
require "rack/test"
RSpec.describe "Slices / Slice loading", :app_integration, :aggregate_failures do
- let(:app_modules) { %i[TestApp Admin Editorial Main Shop] }
+ let(:app_modules) { %i[TestApp Admin Main] }
describe "loading specific slices with config.slices" do
describe "setup app" do
it "ignores any explicitly registered slices not included in load_slices" do
with_tmp_directory(Dir.mktmpdir) do
@@ -46,11 +46,11 @@
expect { Hanami.app.register_slice :admin }.to change { Hanami.app.slices.keys }.to [:admin]
expect { Admin::Slice.register_slice :editorial }.not_to(change { Admin::Slice.slices.keys })
expect { Admin::Slice.register_slice :shop }.to change { Admin::Slice.slices.keys }.to [:shop]
- expect(Shop::Slice).to be
+ expect(Admin::Shop::Slice).to be
end
end
end
end
@@ -121,12 +121,12 @@
expect(Hanami.app.slices.keys).to eq [:admin]
expect(Admin::Slice.slices.keys).to eq [:shop]
expect(Admin::Slice).to be
- expect(Shop::Slice).to be
+ expect(Admin::Shop::Slice).to be
- expect { Editorial }.to raise_error(NameError)
+ expect { Admin::Editorial }.to raise_error(NameError)
expect { Main }.to raise_error(NameError)
end
end
end
end