Sha256: b613249d13aae52789714bf2121ffad2365a8abfe264b47f2ce6949c629c5ece

Contents?: true

Size: 941 Bytes

Versions: 11

Compression:

Stored size: 941 Bytes

Contents

# encoding: utf-8

require 'test_helper'
require 'inflections/es'

class TestSpanishInflections < MiniTest::Unit::TestCase
  def test_plurales_regulares
    assert_equal 'libros', 'libro'.pluralize
    assert_equal 'libro', 'libros'.singularize

    assert_equal 'radios', 'radio'.pluralize
    assert_equal 'radio', 'radios'.singularize

    assert_equal 'señores', 'señor'.pluralize
    assert_equal 'señor', 'señores'.singularize

    assert_equal 'leyes', 'ley'.pluralize
    assert_equal 'ley', 'leyes'.singularize
  end

  def test_plurales_que_terminar_en_z
    assert_equal 'meces', 'mez'.pluralize
    assert_equal 'luces', 'luz'.pluralize
  end

  def test_plurales_que_terminar_en_n_o_s_con_acentos
    assert_equal 'aviones', 'avión'.pluralize
    assert_equal 'intereses', 'interés'.pluralize
  end

  def test_plurales_irregulares
    assert_equal 'los', 'el'.pluralize
    assert_equal 'el', 'los'.singularize
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
inflections-3.3.0 test/es_test.rb
inflections-3.2.12.20130314 test/es_test.rb
inflections-3.2.12.20130305 test/es_test.rb
inflections-3.2.12 test/es_test.rb
inflections-3.2.11 test/es_test.rb
inflections-3.2.9.20121206 test/es_test.rb
inflections-3.2.9.20121201 test/es_test.rb
inflections-3.2.8 test/es_test.rb
inflections-3.2.7.20120803 test/es_test.rb
inflections-0.0.5 test/es_test.rb
inflections-0.0.4 test/es_test.rb