Sha256: c364a5fcab51a29db71a3bd0ee87e1f4ec1b00821ce7dee8497cc1b8e3347564

Contents?: true

Size: 645 Bytes

Versions: 87

Compression:

Stored size: 645 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples_for "an alchemy ingredient editor" do
  let(:ingredient_editor) { Alchemy::IngredientEditor.new(ingredient) }

  before do
    view.class.send :include, Alchemy::Admin::BaseHelper
    view.class.send :include, Alchemy::Admin::IngredientsHelper
    allow(element_editor).to receive(:ingredients) { [ingredient_editor] }
  end

  subject do
    render element_editor
    rendered
  end

  it "renders a ingredient editor", :aggregate_failures do
    is_expected.to have_css(".ingredient-editor.#{ingredient_editor.partial_name}")
    is_expected.to have_css("[data-ingredient-role]")
  end
end

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
alchemy_cms-7.3.4 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.3.3 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.3.2 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.7 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.3.1 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.3.0 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.6 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.5 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.1.12 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.0.15 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-6.1.10 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.4 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.1.11 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.3 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.1.10 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.2 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.1.9 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.0.14 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.2.1 lib/alchemy/test_support/shared_ingredient_editor_examples.rb
alchemy_cms-7.0.13 lib/alchemy/test_support/shared_ingredient_editor_examples.rb