Skip to content

Commit

Permalink
Include helpers in picture ingredient editor spec
Browse files Browse the repository at this point in the history
Those helpers are not included by Rails anymore.
Since a view spec is a unit test we need to stub/include
everything we need on ourselves.
  • Loading branch information
tvdeyen committed Aug 28, 2021
1 parent e81caae commit 0a485ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/views/alchemy/ingredients/picture_editor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
before do
allow(element_editor).to receive(:ingredients) { [Alchemy::IngredientEditor.new(ingredient)] }
allow(ingredient).to receive(:settings) { settings }
view.class.send :include, Alchemy::Admin::BaseHelper
view.class.send :include, Alchemy::Admin::IngredientsHelper
end

subject do
Expand Down

0 comments on commit 0a485ff

Please sign in to comment.