Sha256: a734d3e86f1e43726c3ade0eca3d349df0498231c9fe9922a867760927972cd0

Contents?: true

Size: 545 Bytes

Versions: 8

Compression:

Stored size: 545 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

module Archangel
  module Liquid
    module Tags
      RSpec.describe LocaleTag, type: :liquid_tag,
                                disable: :verify_partial_doubles do
        let(:context) { ::Liquid::Context.new({}, {}, view: view) }

        it "returns current locale" do
          allow(view).to receive(:locale).and_return("en")

          result = ::Liquid::Template.parse("{% locale %}").render(context)

          expect(result).to eq("en")
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
archangel-0.3.0 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.8 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.7 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.6 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.5 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.4 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.3 spec/lib/archangel/liquid/tags/locale_tag_spec.rb
archangel-0.0.2 spec/lib/archangel/liquid/tags/locale_tag_spec.rb