spec/figures_spec.rb in figures-0.1.0 vs spec/figures_spec.rb in figures-0.2.0
- old
+ new
@@ -110,10 +110,14 @@
it 'parses 101' do
assert_equal 'einhunderteins', Figures.parse(101, :de)
end
+ it 'parses 131' do
+ assert_equal 'einhunderteinunddreißig', Figures.parse(131, :de)
+ end
+
it 'parses 199' do
assert_equal 'einhundertneunundneunzig', Figures.parse(199, :de)
end
it 'parses 200' do
@@ -139,17 +143,34 @@
it 'parses 100_000' do
assert_equal 'einhunderttausend', Figures.parse(100_000, :de)
end
it 'parses 1_000_000' do
- fail 'figure out'
- assert_equal 'million', Figures.parse(1_000_000, :de)
+ assert_equal 'eine Million', Figures.parse(1_000_000, :de)
end
+ it 'parses 1_000_001' do
+ assert_equal 'eine Million eins', Figures.parse(1_000_001, :de)
+ end
+
it 'parses 2_000_000' do
- fail 'figure out'
- assert_equal 'zwei millionen', Figures.parse(1_000_000, :de)
+ assert_equal 'zwei Millionen', Figures.parse(2_000_000, :de)
end
+
+ it 'parses 21_000_000' do
+ assert_equal 'einundzwanzig Millionen', Figures.parse(21_000_000, :de)
+ end
+
+ it 'parses 1_000_000_000' do
+ assert_equal 'eine Milliarde', Figures.parse(1_000_000_000, :de)
+ end
+
+ it 'parses 2_000_000_000' do
+ assert_equal 'zwei Milliarden', Figures.parse(2_000_000_000, :de)
+ end
+
+ it 'parses 2_000_003_000_000' do
+ assert_equal 'zwei Billionen drei Millionen', Figures.parse(2_000_003_000_000, :de)
+ end
end
end
end
-