Sha256: ec5b73dc94369741b4a43b94087490fed9dbc61fcc857468b149522351bfe5f7
Contents?: true
Size: 909 Bytes
Versions: 8
Compression:
Stored size: 909 Bytes
Contents
# frozen_string_literal: true require "rails_helper" module Archangel module Liquid module Tags RSpec.describe TextDirectionTag, type: :liquid_tag, disable: :verify_partial_doubles do let(:context) { ::Liquid::Context.new({}, {}, view: view) } it "returns `ltr` text direction" do allow(view).to receive(:text_direction).and_return("ltr") result = ::Liquid::Template.parse("{% text_direction %}") .render(context) expect(result).to eq("ltr") end it "returns `rtl` text direction" do allow(view).to receive(:text_direction).and_return("rtl") result = ::Liquid::Template.parse("{% text_direction %}") .render(context) expect(result).to eq("rtl") end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems