Sha256: a60b6d6d112a4b5c88af969d3fc4cbeaf12b7766cc17f4329769c2ba32383e6d

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

require 'spec_helper'

module Ransack
  describe Translate do

    describe '.attribute' do
      it 'translate namespaced attribute like AR does' do
        ar_translation = ::Namespace::Article.human_attribute_name(:title)
        ransack_translation = Ransack::Translate.attribute(
          :title,
          :context => ::Namespace::Article.search.context
          )
        expect(ransack_translation).to eq ar_translation
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ransack-1.5.1 spec/ransack/translate_spec.rb
ransack-1.5.0 spec/ransack/translate_spec.rb