Sha256: bbfe04100d2f7f8e5be29cc3277eb386e627838ae63739dea614ba219a7cabd4

Contents?: true

Size: 619 Bytes

Versions: 4

Compression:

Stored size: 619 Bytes

Contents

require 'rails_helper'

require 'citizen_budget_model/gettext_helper'

module CitizenBudgetModel
  RSpec.describe GetTextHelper do
    before(:all) do
      require 'citizen_budget_model/js_parser'
      GetText::Tools::XGetText.add_parser(CitizenBudgetModel::JsParser)
    end

    describe '.messages' do
      it 'should extract messages from .erb, .js and .rb files' do
        messages = GetTextHelper.messages('app/**/*.{erb,rb,js}')
        expect(messages).to include('Dummy') # .erb
        expect(messages).to include('bar') # .js
        expect(messages).to include('pong') # .rb
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
citizen_budget_model-0.0.4 spec/citizen_budget_model/gettext_helper_spec.rb
citizen_budget_model-0.0.3 spec/citizen_budget_model/gettext_helper_spec.rb
citizen_budget_model-0.0.2 spec/citizen_budget_model/gettext_helper_spec.rb
citizen_budget_model-0.0.1 spec/citizen_budget_model/gettext_helper_spec.rb