Sha256: 221608c561fb71c8ee6b1d44b8130f32365ff5ed7cf830076440ce9bda4e1add

Contents?: true

Size: 948 Bytes

Versions: 14

Compression:

Stored size: 948 Bytes

Contents

# -*- encoding : utf-8 -*-

RSpec.describe Card::Set::All::RichHtml::ProcessLayout do
  describe "#explicit_modal_wrapper?" do
    subject(:format) { Card["A"].format }

    example "single wrapper" do
      allow(format).to receive(:view_setting).and_return :modal
      expect(format).to be_explicit_modal_wrapper(:view)
    end

    example "array of wrappers" do
      allow(format).to receive(:view_setting).and_return %i[other modal]
      expect(format).to be_explicit_modal_wrapper(:view)
    end

    example "array of wrappers with options" do
      allow(format).to receive(:view_setting)
        .and_return [:other, [:modal, { opts: :a }]]
      expect(format).to be_explicit_modal_wrapper(:view)
    end

    example "hash of wrappers with options" do
      allow(format).to receive(:view_setting)
        .and_return other: { opt: :a },  modal: { opts: :a }
      expect(format).to be_explicit_modal_wrapper(:view)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
card-1.100.0 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.6 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.5 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.4 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.3 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.2 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.1 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.99.0 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.98.3 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.98.2 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.98.1 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.98.0 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.97.0.1 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb
card-1.97.0 mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb