Sha256: 14a0f3ec62324dbf6a2c6767f77be7fbb475660019956ef02f6e1be3d967e3e8

Contents?: true

Size: 1011 Bytes

Versions: 2

Compression:

Stored size: 1011 Bytes

Contents

require 'spec_helper'

include Spec::Example

describe Pending do
  
  describe 'in portuguese for example' do
    
    before(:each) do
      @keywords = { "pending" => 'pendente|pendencia'}
      stub_language!('pt', @keywords)
    end

    it "should have the translate pending method" do
      Pending.translate_pending_keywords
      name_methods = methods.to_symbols
      [:pendente, :pendencia].each do |translated_pending_method|
        name_methods.should include(translated_pending_method)
      end
    end
    
  end
  
  describe 'in spanish for example' do
    
    before(:each) do
      @keywords = { "pending" => 'spec_pendente|pendenciaa'}
      stub_language!('es', @keywords)
    end

    it "should have the translate pending method" do
      Pending.translate_pending_keywords
      name_methods = methods.to_symbols
      [:spec_pendente, :pendenciaa].each do |translated_pending_method|
        name_methods.should include(translated_pending_method)
      end
    end
    
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-i18n-1.2.1 spec/spec-i18n/example/pending_spec.rb
rspec-i18n-1.2.0 spec/spec-i18n/example/pending_spec.rb