Skip to content

Commit

Permalink
fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
szTheory committed Jan 15, 2019
1 parent 19a6776 commit 695b650
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
9 changes: 2 additions & 7 deletions spec/meta_presenter/builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,9 @@ def controller_ancestors
end

context "controller without a presenter" do
let(:controller_class) { ApplicationController }

before do
Object.send(:remove_const, :ApplicationPresenter)
expect(Object.constants).to_not include(:ApplicationPresenter)
end
let(:controller_class) { WithoutPresenterController }

let(:presenter_file_path) { File.join(object.presenter_base_dir, "application_presenter.rb") }
let(:presenter_file_path) { File.join(object.presenter_base_dir, "without_presenter_presenter.rb") }

context "but file exists" do
before do
Expand Down
2 changes: 2 additions & 0 deletions spec/support/app/controllers/without_presenter_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class WithoutPresenterController < ApplicationController
end
Empty file.

0 comments on commit 695b650

Please sign in to comment.