Sha256: 2577f04e1f75d8adfc3de712ba991e0128769ec3307c1be23110f8016a001770

Contents?: true

Size: 507 Bytes

Versions: 19

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_context "with invalid file" do
  let(:invalid_file) do
    fixture_file_upload(
      File.expand_path("../../../spec/fixtures/users.yml", __dir__),
      "text/x-yaml"
    )
  end

  before do
    allow(Alchemy::Attachment).to receive(:allowed_filetypes) do
      ["png"]
    end
  end
end

RSpec.shared_context "in preview mode" do
  around do |example|
    Alchemy::Current.preview_page = page
    example.run
    Alchemy::Current.preview_page = nil
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
alchemy_cms-7.4.2 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.6 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.9 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.4.1 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.4.0 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.5 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.8 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.4 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.3 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.2 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.7 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.1 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.3.0 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.6 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.5 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.4 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.3 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.2 lib/alchemy/test_support/shared_contexts.rb
alchemy_cms-7.2.1 lib/alchemy/test_support/shared_contexts.rb