Sha256: 36b4af136caeb5df1ceb2e4496dd5385b617a68614c5868b5bed20ebc158ac8a

Contents?: true

Size: 844 Bytes

Versions: 8

Compression:

Stored size: 844 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

module Archangel
  RSpec.describe RenderService, type: :service do
    context "#new" do
      it "builds the liquid content" do
        content = <<-LIQUID
          {% assign foo="bar" %}
          ~{{ foo }}~
          *{{ bat }}*
        LIQUID

        rendered = described_class.new(content, bat: "baz").call

        expect(rendered).to include("~bar~")
        expect(rendered).to include("*baz*")
      end
    end

    context ".call" do
      it "builds the liquid content" do
        content = <<-LIQUID
          {% assign foo="bar" %}
          ~{{ foo }}~
          *{{ bat }}*
        LIQUID

        rendered = described_class.call(content, bat: "baz")

        expect(rendered).to include("~bar~")
        expect(rendered).to include("*baz*")
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
archangel-0.3.0 spec/services/archangel/render_service_spec.rb
archangel-0.0.8 spec/services/archangel/render_service_spec.rb
archangel-0.0.7 spec/services/archangel/render_service_spec.rb
archangel-0.0.6 spec/services/archangel/render_service_spec.rb
archangel-0.0.5 spec/services/archangel/render_service_spec.rb
archangel-0.0.4 spec/services/archangel/render_service_spec.rb
archangel-0.0.3 spec/services/archangel/render_service_spec.rb
archangel-0.0.2 spec/services/archangel/render_service_spec.rb