income-tax 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/income_tax/countries/austria.rb +13 -5
- data/lib/income_tax/countries/france.rb +9 -1
- data/lib/income_tax/countries/germany.rb +59 -18
- data/lib/income_tax/countries/germany/rates.tsv +10 -0
- data/lib/income_tax/countries/greece.rb +3 -2
- data/lib/income_tax/countries/singapore.rb +2 -11
- data/lib/income_tax/countries/switzerland/aargau.rb +1 -1
- data/lib/income_tax/countries/switzerland/appenzell_inner.rb +1 -1
- data/lib/income_tax/countries/switzerland/appenzell_outer.rb +1 -1
- data/lib/income_tax/countries/switzerland/basel_city.rb +1 -1
- data/lib/income_tax/countries/switzerland/basel_land.rb +1 -1
- data/lib/income_tax/countries/switzerland/bern.rb +1 -1
- data/lib/income_tax/countries/switzerland/data/aargau.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/appenzell_inner.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/appenzell_outer.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/basel_city.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/basel_land.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/bern.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/fribourg.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/geneva.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/glarus.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/grisons.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/jura.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/lucerne.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/neuchatel.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/nidwalden.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/obwalden.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/schaffhausen.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/schwyz.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/solothurn.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/st_gallen.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/thurgau.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/ticino.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/uri.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/valais.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/vaud.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/zug.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/zurich.dat +0 -0
- data/lib/income_tax/countries/switzerland/fribourg.rb +1 -1
- data/lib/income_tax/countries/switzerland/geneva.rb +1 -1
- data/lib/income_tax/countries/switzerland/glarus.rb +1 -1
- data/lib/income_tax/countries/switzerland/grisons.rb +1 -1
- data/lib/income_tax/countries/switzerland/jura.rb +1 -1
- data/lib/income_tax/countries/switzerland/lucerne.rb +1 -1
- data/lib/income_tax/countries/switzerland/neuchatel.rb +1 -1
- data/lib/income_tax/countries/switzerland/nidwalden.rb +1 -1
- data/lib/income_tax/countries/switzerland/obwalden.rb +1 -1
- data/lib/income_tax/countries/switzerland/schaffhausen.rb +1 -1
- data/lib/income_tax/countries/switzerland/schwyz.rb +1 -1
- data/lib/income_tax/countries/switzerland/solothurn.rb +1 -1
- data/lib/income_tax/countries/switzerland/st_gallen.rb +1 -1
- data/lib/income_tax/countries/switzerland/thurgau.rb +1 -1
- data/lib/income_tax/countries/switzerland/ticino.rb +1 -1
- data/lib/income_tax/countries/switzerland/uri.rb +1 -1
- data/lib/income_tax/countries/switzerland/valais.rb +1 -1
- data/lib/income_tax/countries/switzerland/vaud.rb +1 -1
- data/lib/income_tax/countries/switzerland/zug.rb +1 -1
- data/lib/income_tax/countries/switzerland/zurich.rb +1 -1
- data/lib/income_tax/countries/united_kingdom.rb +12 -4
- data/lib/income_tax/models/generic.rb +5 -1
- data/lib/income_tax/models/progressive.rb +27 -5
- data/lib/income_tax/rate.rb +1 -0
- data/lib/income_tax/register.rb +6 -0
- data/lib/income_tax/version.rb +1 -1
- data/locations.md +250 -13
- data/readme.md +3 -2
- data/script/generate_switzerland.rb +10 -6
- data/spec/income_tax/countries/afghanistan_spec.rb +11 -1
- data/spec/income_tax/countries/aland_spec.rb +11 -1
- data/spec/income_tax/countries/albania_spec.rb +11 -1
- data/spec/income_tax/countries/algeria_spec.rb +11 -1
- data/spec/income_tax/countries/american_samoa_spec.rb +11 -1
- data/spec/income_tax/countries/andorra_spec.rb +11 -1
- data/spec/income_tax/countries/angola_spec.rb +11 -1
- data/spec/income_tax/countries/anguilla_spec.rb +11 -1
- data/spec/income_tax/countries/antigua_and_barbuda_spec.rb +11 -1
- data/spec/income_tax/countries/argentina_spec.rb +11 -1
- data/spec/income_tax/countries/armenia_spec.rb +11 -1
- data/spec/income_tax/countries/aruba_spec.rb +11 -1
- data/spec/income_tax/countries/australia_spec.rb +11 -1
- data/spec/income_tax/countries/austria_spec.rb +185 -74
- data/spec/income_tax/countries/azerbaijan_spec.rb +11 -1
- data/spec/income_tax/countries/bahamas_spec.rb +11 -1
- data/spec/income_tax/countries/bahrain_spec.rb +11 -1
- data/spec/income_tax/countries/bangladesh_spec.rb +11 -1
- data/spec/income_tax/countries/barbados_spec.rb +11 -1
- data/spec/income_tax/countries/belarus_spec.rb +11 -1
- data/spec/income_tax/countries/belgium_spec.rb +11 -1
- data/spec/income_tax/countries/belize_spec.rb +11 -1
- data/spec/income_tax/countries/benin_spec.rb +11 -1
- data/spec/income_tax/countries/bermuda_spec.rb +11 -1
- data/spec/income_tax/countries/bhutan_spec.rb +11 -1
- data/spec/income_tax/countries/bolivia_spec.rb +11 -1
- data/spec/income_tax/countries/bosnia_and_herzegovina_spec.rb +11 -1
- data/spec/income_tax/countries/botswana_spec.rb +11 -1
- data/spec/income_tax/countries/bouvet_island_spec.rb +11 -1
- data/spec/income_tax/countries/brazil_spec.rb +11 -1
- data/spec/income_tax/countries/british_indian_ocean_territory_spec.rb +35 -25
- data/spec/income_tax/countries/brunei_spec.rb +11 -1
- data/spec/income_tax/countries/bulgaria_spec.rb +11 -1
- data/spec/income_tax/countries/burkina_faso_spec.rb +11 -1
- data/spec/income_tax/countries/burundi_spec.rb +11 -1
- data/spec/income_tax/countries/cambodia_spec.rb +11 -1
- data/spec/income_tax/countries/cameroon_spec.rb +11 -1
- data/spec/income_tax/countries/canada_spec.rb +11 -1
- data/spec/income_tax/countries/cape_verde_spec.rb +11 -1
- data/spec/income_tax/countries/caribbean_netherlands_spec.rb +11 -1
- data/spec/income_tax/countries/cayman_islands_spec.rb +11 -1
- data/spec/income_tax/countries/central_african_republic_spec.rb +11 -1
- data/spec/income_tax/countries/chad_spec.rb +11 -1
- data/spec/income_tax/countries/chile_spec.rb +11 -1
- data/spec/income_tax/countries/china_spec.rb +11 -1
- data/spec/income_tax/countries/christmas_island_spec.rb +11 -1
- data/spec/income_tax/countries/cocos_keeling_islands_spec.rb +11 -1
- data/spec/income_tax/countries/colombia_spec.rb +11 -1
- data/spec/income_tax/countries/comoros_spec.rb +11 -1
- data/spec/income_tax/countries/congo_republic_spec.rb +11 -1
- data/spec/income_tax/countries/congo_spec.rb +11 -1
- data/spec/income_tax/countries/cook_islands_spec.rb +11 -1
- data/spec/income_tax/countries/costa_rica_spec.rb +11 -1
- data/spec/income_tax/countries/croatia_spec.rb +11 -1
- data/spec/income_tax/countries/cuba_spec.rb +11 -1
- data/spec/income_tax/countries/curacao_spec.rb +11 -1
- data/spec/income_tax/countries/cyprus_spec.rb +11 -1
- data/spec/income_tax/countries/czech_republic_spec.rb +11 -1
- data/spec/income_tax/countries/denmark_spec.rb +11 -1
- data/spec/income_tax/countries/djibouti_spec.rb +11 -1
- data/spec/income_tax/countries/dominica_spec.rb +11 -1
- data/spec/income_tax/countries/dominican_republic_spec.rb +11 -1
- data/spec/income_tax/countries/ecuador_spec.rb +11 -1
- data/spec/income_tax/countries/egypt_spec.rb +11 -1
- data/spec/income_tax/countries/el_salvador_spec.rb +11 -1
- data/spec/income_tax/countries/equatorial_guinea_spec.rb +11 -1
- data/spec/income_tax/countries/eritrea_spec.rb +11 -1
- data/spec/income_tax/countries/estonia_spec.rb +11 -1
- data/spec/income_tax/countries/ethiopia_spec.rb +11 -1
- data/spec/income_tax/countries/falkland_islands_spec.rb +11 -1
- data/spec/income_tax/countries/faroe_islands_spec.rb +11 -1
- data/spec/income_tax/countries/fiji_spec.rb +11 -1
- data/spec/income_tax/countries/finland_spec.rb +88 -75
- data/spec/income_tax/countries/france_spec.rb +185 -74
- data/spec/income_tax/countries/french_guiana_spec.rb +11 -1
- data/spec/income_tax/countries/french_polynesia_spec.rb +11 -1
- data/spec/income_tax/countries/french_southern_territories_spec.rb +11 -1
- data/spec/income_tax/countries/gabon_spec.rb +11 -1
- data/spec/income_tax/countries/gambia_spec.rb +11 -1
- data/spec/income_tax/countries/georgia_spec.rb +11 -1
- data/spec/income_tax/countries/germany_spec.rb +864 -67
- data/spec/income_tax/countries/ghana_spec.rb +11 -1
- data/spec/income_tax/countries/gibraltar_spec.rb +11 -1
- data/spec/income_tax/countries/greece_spec.rb +41 -31
- data/spec/income_tax/countries/greenland_spec.rb +11 -1
- data/spec/income_tax/countries/grenada_spec.rb +11 -1
- data/spec/income_tax/countries/guadeloupe_spec.rb +11 -1
- data/spec/income_tax/countries/guam_spec.rb +11 -1
- data/spec/income_tax/countries/guatemala_spec.rb +11 -1
- data/spec/income_tax/countries/guernsey_spec.rb +11 -1
- data/spec/income_tax/countries/guinea_bissau_spec.rb +11 -1
- data/spec/income_tax/countries/guinea_spec.rb +11 -1
- data/spec/income_tax/countries/guyana_spec.rb +11 -1
- data/spec/income_tax/countries/haiti_spec.rb +11 -1
- data/spec/income_tax/countries/heard_and_mcdonald_islands_spec.rb +11 -1
- data/spec/income_tax/countries/honduras_spec.rb +11 -1
- data/spec/income_tax/countries/hong_kong_spec.rb +11 -1
- data/spec/income_tax/countries/hungary_spec.rb +11 -1
- data/spec/income_tax/countries/iceland_spec.rb +11 -1
- data/spec/income_tax/countries/india_spec.rb +11 -1
- data/spec/income_tax/countries/indonesia_spec.rb +11 -1
- data/spec/income_tax/countries/iran_spec.rb +11 -1
- data/spec/income_tax/countries/iraq_spec.rb +11 -1
- data/spec/income_tax/countries/ireland_spec.rb +11 -1
- data/spec/income_tax/countries/isle_of_man_spec.rb +11 -1
- data/spec/income_tax/countries/israel_spec.rb +11 -1
- data/spec/income_tax/countries/italy_spec.rb +11 -1
- data/spec/income_tax/countries/ivory_coast_spec.rb +11 -1
- data/spec/income_tax/countries/jamaica_spec.rb +11 -1
- data/spec/income_tax/countries/japan_spec.rb +11 -1
- data/spec/income_tax/countries/jersey_spec.rb +11 -1
- data/spec/income_tax/countries/jordan_spec.rb +11 -1
- data/spec/income_tax/countries/kazakhstan_spec.rb +11 -1
- data/spec/income_tax/countries/kenya_spec.rb +11 -1
- data/spec/income_tax/countries/kiribati_spec.rb +11 -1
- data/spec/income_tax/countries/kosovo_spec.rb +11 -1
- data/spec/income_tax/countries/kuwait_spec.rb +11 -1
- data/spec/income_tax/countries/kyrgyzstan_spec.rb +11 -1
- data/spec/income_tax/countries/laos_spec.rb +11 -1
- data/spec/income_tax/countries/latvia_spec.rb +11 -1
- data/spec/income_tax/countries/lebanon_spec.rb +11 -1
- data/spec/income_tax/countries/lesotho_spec.rb +11 -1
- data/spec/income_tax/countries/liberia_spec.rb +11 -1
- data/spec/income_tax/countries/libya_spec.rb +11 -1
- data/spec/income_tax/countries/liechtenstein_spec.rb +11 -1
- data/spec/income_tax/countries/lithuania_spec.rb +11 -1
- data/spec/income_tax/countries/luxembourg_spec.rb +11 -1
- data/spec/income_tax/countries/macao_spec.rb +11 -1
- data/spec/income_tax/countries/macedonia_spec.rb +11 -1
- data/spec/income_tax/countries/madagascar_spec.rb +11 -1
- data/spec/income_tax/countries/malawi_spec.rb +11 -1
- data/spec/income_tax/countries/malaysia_spec.rb +11 -1
- data/spec/income_tax/countries/maldives_spec.rb +11 -1
- data/spec/income_tax/countries/mali_spec.rb +11 -1
- data/spec/income_tax/countries/malta_spec.rb +11 -1
- data/spec/income_tax/countries/marshall_islands_spec.rb +11 -1
- data/spec/income_tax/countries/martinique_spec.rb +11 -1
- data/spec/income_tax/countries/mauritania_spec.rb +11 -1
- data/spec/income_tax/countries/mauritius_spec.rb +11 -1
- data/spec/income_tax/countries/mayotte_spec.rb +11 -1
- data/spec/income_tax/countries/mexico_spec.rb +11 -1
- data/spec/income_tax/countries/micronesia_spec.rb +11 -1
- data/spec/income_tax/countries/moldova_spec.rb +11 -1
- data/spec/income_tax/countries/monaco_spec.rb +11 -1
- data/spec/income_tax/countries/mongolia_spec.rb +11 -1
- data/spec/income_tax/countries/montenegro_spec.rb +11 -1
- data/spec/income_tax/countries/montserrat_spec.rb +11 -1
- data/spec/income_tax/countries/morocco_spec.rb +11 -1
- data/spec/income_tax/countries/mozambique_spec.rb +11 -1
- data/spec/income_tax/countries/myanmar_spec.rb +11 -1
- data/spec/income_tax/countries/namibia_spec.rb +11 -1
- data/spec/income_tax/countries/nauru_spec.rb +11 -1
- data/spec/income_tax/countries/nepal_spec.rb +11 -1
- data/spec/income_tax/countries/netherlands_antilles_spec.rb +11 -1
- data/spec/income_tax/countries/netherlands_spec.rb +11 -1
- data/spec/income_tax/countries/new_caledonia_spec.rb +11 -1
- data/spec/income_tax/countries/new_zealand_spec.rb +11 -1
- data/spec/income_tax/countries/nicaragua_spec.rb +11 -1
- data/spec/income_tax/countries/niger_spec.rb +11 -1
- data/spec/income_tax/countries/nigeria_spec.rb +11 -1
- data/spec/income_tax/countries/niue_spec.rb +11 -1
- data/spec/income_tax/countries/norfolk_island_spec.rb +11 -1
- data/spec/income_tax/countries/north_korea_spec.rb +11 -1
- data/spec/income_tax/countries/northern_mariana_islands_spec.rb +11 -1
- data/spec/income_tax/countries/norway_spec.rb +88 -75
- data/spec/income_tax/countries/oman_spec.rb +11 -1
- data/spec/income_tax/countries/pakistan_spec.rb +11 -1
- data/spec/income_tax/countries/palau_spec.rb +11 -1
- data/spec/income_tax/countries/palestinian_territory_spec.rb +11 -1
- data/spec/income_tax/countries/panama_spec.rb +11 -1
- data/spec/income_tax/countries/papua_new_guinea_spec.rb +11 -1
- data/spec/income_tax/countries/paraguay_spec.rb +11 -1
- data/spec/income_tax/countries/peru_spec.rb +11 -1
- data/spec/income_tax/countries/philippines_spec.rb +11 -1
- data/spec/income_tax/countries/pitcairn_spec.rb +11 -1
- data/spec/income_tax/countries/poland_spec.rb +11 -1
- data/spec/income_tax/countries/portugal_spec.rb +11 -1
- data/spec/income_tax/countries/puerto_rico_spec.rb +11 -1
- data/spec/income_tax/countries/qatar_spec.rb +11 -1
- data/spec/income_tax/countries/reunion_spec.rb +11 -1
- data/spec/income_tax/countries/romania_spec.rb +11 -1
- data/spec/income_tax/countries/russia_spec.rb +11 -1
- data/spec/income_tax/countries/rwanda_spec.rb +11 -1
- data/spec/income_tax/countries/saint_barthelemy_spec.rb +11 -1
- data/spec/income_tax/countries/saint_helena_spec.rb +11 -1
- data/spec/income_tax/countries/saint_kitts_and_nevis_spec.rb +11 -1
- data/spec/income_tax/countries/saint_lucia_spec.rb +11 -1
- data/spec/income_tax/countries/saint_martin_spec.rb +11 -1
- data/spec/income_tax/countries/saint_pierre_and_miquelon_spec.rb +11 -1
- data/spec/income_tax/countries/saint_vincent_and_the_grenedines_spec.rb +11 -1
- data/spec/income_tax/countries/samoa_spec.rb +11 -1
- data/spec/income_tax/countries/san_marino_spec.rb +11 -1
- data/spec/income_tax/countries/sao_tome_and_principe_spec.rb +11 -1
- data/spec/income_tax/countries/saudi_arabia_spec.rb +11 -1
- data/spec/income_tax/countries/senegal_spec.rb +11 -1
- data/spec/income_tax/countries/serbia_spec.rb +11 -1
- data/spec/income_tax/countries/seychelles_spec.rb +11 -1
- data/spec/income_tax/countries/sierra_leone_spec.rb +11 -1
- data/spec/income_tax/countries/singapore_spec.rb +185 -74
- data/spec/income_tax/countries/sint_maarten_spec.rb +11 -1
- data/spec/income_tax/countries/slovakia_spec.rb +11 -1
- data/spec/income_tax/countries/slovenia_spec.rb +11 -1
- data/spec/income_tax/countries/solomon_islands_spec.rb +11 -1
- data/spec/income_tax/countries/somalia_spec.rb +11 -1
- data/spec/income_tax/countries/south_africa_spec.rb +11 -1
- data/spec/income_tax/countries/south_georgia_and_the_south_sandwich_islands_spec.rb +35 -25
- data/spec/income_tax/countries/south_korea_spec.rb +11 -1
- data/spec/income_tax/countries/south_sudan_spec.rb +11 -1
- data/spec/income_tax/countries/spain_spec.rb +11 -1
- data/spec/income_tax/countries/sri_lanka_spec.rb +11 -1
- data/spec/income_tax/countries/sudan_spec.rb +11 -1
- data/spec/income_tax/countries/suriname_spec.rb +11 -1
- data/spec/income_tax/countries/svalbard_and_jan_mayen_spec.rb +11 -1
- data/spec/income_tax/countries/swaziland_spec.rb +11 -1
- data/spec/income_tax/countries/sweden_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/aargau_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/appenzell_inner_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/appenzell_outer_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/basel_city_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/basel_land_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/bern_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/fribourg_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/geneva_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/glarus_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/grisons_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/jura_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/lucerne_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/neuchatel_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/nidwalden_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/obwalden_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/schaffhausen_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/schwyz_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/solothurn_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/st_gallen_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/thurgau_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/ticino_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/uri_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/valais_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/vaud_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/zug_spec.rb +11 -1
- data/spec/income_tax/countries/switzerland/zurich_spec.rb +185 -74
- data/spec/income_tax/countries/switzerland_spec.rb +11 -1
- data/spec/income_tax/countries/syria_spec.rb +11 -1
- data/spec/income_tax/countries/taiwan_spec.rb +11 -1
- data/spec/income_tax/countries/tajikistan_spec.rb +11 -1
- data/spec/income_tax/countries/tanzania_spec.rb +11 -1
- data/spec/income_tax/countries/thailand_spec.rb +11 -1
- data/spec/income_tax/countries/timor_leste_spec.rb +11 -1
- data/spec/income_tax/countries/togo_spec.rb +11 -1
- data/spec/income_tax/countries/tokelau_spec.rb +11 -1
- data/spec/income_tax/countries/tonga_spec.rb +11 -1
- data/spec/income_tax/countries/trinidad_and_tobago_spec.rb +11 -1
- data/spec/income_tax/countries/tunisia_spec.rb +11 -1
- data/spec/income_tax/countries/turkey_spec.rb +11 -1
- data/spec/income_tax/countries/turkmenistan_spec.rb +11 -1
- data/spec/income_tax/countries/turks_and_caicos_islands_spec.rb +11 -1
- data/spec/income_tax/countries/tuvalu_spec.rb +11 -1
- data/spec/income_tax/countries/uganda_spec.rb +11 -1
- data/spec/income_tax/countries/ukraine_spec.rb +11 -1
- data/spec/income_tax/countries/united_arab_emirates_spec.rb +11 -1
- data/spec/income_tax/countries/united_kingdom_spec.rb +185 -74
- data/spec/income_tax/countries/united_states/alabama_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/alaska_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/arizona_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/arkansas_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/california_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/colorado_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/connecticut_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/dc_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/delaware_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/florida_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/georgia_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/hawaii_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/idaho_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/illinois_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/indiana_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/iowa_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/kansas_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/kentucky_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/louisiana_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/maine_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/maryland_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/massachusetts_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/michigan_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/minnesota_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/mississippi_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/missouri_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/montana_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/nebraska_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/nevada_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/new_hampshire_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/new_jersey_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/new_mexico_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/new_york_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/north_carolina_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/north_dakota_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/ohio_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/oklahoma_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/oregon_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/pennsylvania_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/rhode_island_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/south_carolina_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/south_dakota_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/tennessee_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/texas_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/utah_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/vermont_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/virginia_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/washington_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/west_virginia_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/wisconsin_spec.rb +11 -1
- data/spec/income_tax/countries/united_states/wyoming_spec.rb +11 -1
- data/spec/income_tax/countries/united_states_minor_outlying_islands_spec.rb +11 -1
- data/spec/income_tax/countries/united_states_spec.rb +11 -1
- data/spec/income_tax/countries/uruguay_spec.rb +11 -1
- data/spec/income_tax/countries/uzbekistan_spec.rb +11 -1
- data/spec/income_tax/countries/vanuatu_spec.rb +11 -1
- data/spec/income_tax/countries/vatican_spec.rb +11 -1
- data/spec/income_tax/countries/venezuela_spec.rb +11 -1
- data/spec/income_tax/countries/vietnam_spec.rb +11 -1
- data/spec/income_tax/countries/virgin_islands_british_spec.rb +11 -1
- data/spec/income_tax/countries/virgin_islands_us_spec.rb +11 -1
- data/spec/income_tax/countries/wallis_and_futuna_spec.rb +11 -1
- data/spec/income_tax/countries/western_sahara_spec.rb +11 -1
- data/spec/income_tax/countries/yemen_spec.rb +11 -1
- data/spec/income_tax/countries/zambia_spec.rb +11 -1
- data/spec/income_tax/countries/zimbabwe_spec.rb +11 -1
- metadata +3 -2
@@ -1,89 +1,886 @@
|
|
1
1
|
describe IncomeTax::Countries::Germany do
|
2
|
-
subject(:result) { described_class.new(income: income, income_type: type) }
|
2
|
+
subject(:result) { described_class.new(income: income, income_type: type, tax_year: tax_year) }
|
3
3
|
let(:type) { :gross }
|
4
4
|
|
5
|
-
describe "
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
describe "tax year 2002" do
|
6
|
+
|
7
|
+
describe "from gross income of 0" do
|
8
|
+
let(:tax_year) { 2002 }
|
9
|
+
let(:income) { 0 }
|
10
|
+
its(:rate) { should be == Rational(0, 1) }
|
11
|
+
its(:gross_income) { should be == 0 }
|
12
|
+
its(:net_income) { should be == 0 }
|
13
|
+
its(:taxes) { should be == 0 }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "from gross income of 1000" do
|
17
|
+
let(:tax_year) { 2002 }
|
18
|
+
let(:income) { 1000 }
|
19
|
+
its(:rate) { should be == Rational(0, 1) }
|
20
|
+
its(:gross_income) { should be == 1000 }
|
21
|
+
its(:net_income) { should be == 1000 }
|
22
|
+
its(:taxes) { should be == 0 }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "from gross income of 10000" do
|
26
|
+
let(:tax_year) { 2002 }
|
27
|
+
let(:income) { 10000 }
|
28
|
+
its(:rate) { should be == Rational(3, 47) }
|
29
|
+
its(:gross_income) { should be == 10000 }
|
30
|
+
its(:net_income) { should be == "9361.725".to_d }
|
31
|
+
its(:taxes) { should be == "638.275".to_d }
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "from gross income of 100000" do
|
35
|
+
let(:tax_year) { 2002 }
|
36
|
+
let(:income) { 100000 }
|
37
|
+
its(:rate) { should be == Rational(119, 292) }
|
38
|
+
its(:gross_income) { should be == 100000 }
|
39
|
+
its(:net_income) { should be == "59247.46".to_d }
|
40
|
+
its(:taxes) { should be == "40752.54".to_d }
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "from gross income of 100000000" do
|
44
|
+
let(:tax_year) { 2002 }
|
45
|
+
let(:income) { 100000000 }
|
46
|
+
its(:rate) { should be == Rational(199, 389) }
|
47
|
+
its(:gross_income) { should be == 100000000 }
|
48
|
+
its(:net_income) { should be == "48842914.96".to_d }
|
49
|
+
its(:taxes) { should be == "51157085.04".to_d }
|
50
|
+
end
|
12
51
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
52
|
+
describe "from net income of 0" do
|
53
|
+
let(:type) { :net }
|
54
|
+
let(:tax_year) { 2002 }
|
55
|
+
let(:income) { 0 }
|
56
|
+
its(:rate) { should be == Rational(0, 1) }
|
57
|
+
its(:gross_income) { should be == 0 }
|
58
|
+
its(:net_income) { should be == 0 }
|
59
|
+
its(:taxes) { should be == 0 }
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "from net income of 1000" do
|
63
|
+
let(:type) { :net }
|
64
|
+
let(:tax_year) { 2002 }
|
65
|
+
let(:income) { 1000 }
|
66
|
+
its(:rate) { should be == Rational(11, 200) }
|
67
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
68
|
+
its(:net_income) { should be == 1000 }
|
69
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "from net income of 10000" do
|
73
|
+
let(:type) { :net }
|
74
|
+
let(:tax_year) { 2002 }
|
75
|
+
let(:income) { 10000 }
|
76
|
+
its(:rate) { should be == Rational(56, 463) }
|
77
|
+
its(:gross_income) { should be == "11376.010582010582".to_d }
|
78
|
+
its(:net_income) { should be == 10000 }
|
79
|
+
its(:taxes) { should be == "1376.010582010582".to_d }
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "from net income of 100000" do
|
83
|
+
let(:type) { :net }
|
84
|
+
let(:tax_year) { 2002 }
|
85
|
+
let(:income) { 100000 }
|
86
|
+
its(:rate) { should be == Rational(156, 349) }
|
87
|
+
its(:gross_income) { should be == "180826.10582010582".to_d }
|
88
|
+
its(:net_income) { should be == 100000 }
|
89
|
+
its(:taxes) { should be == "80826.10582010582".to_d }
|
90
|
+
end
|
91
|
+
|
92
|
+
describe "from net income of 100000000" do
|
93
|
+
let(:type) { :net }
|
94
|
+
let(:tax_year) { 2002 }
|
95
|
+
let(:income) { 100000000 }
|
96
|
+
its(:rate) { should be == Rational(3532, 7065) }
|
97
|
+
its(:gross_income) { should be == "199975693.82010582".to_d }
|
98
|
+
its(:net_income) { should be == 100000000 }
|
99
|
+
its(:taxes) { should be == "99975693.82010582".to_d }
|
100
|
+
end
|
19
101
|
end
|
20
102
|
|
21
|
-
describe "
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
103
|
+
describe "tax year 2004" do
|
104
|
+
|
105
|
+
describe "from gross income of 0" do
|
106
|
+
let(:tax_year) { 2004 }
|
107
|
+
let(:income) { 0 }
|
108
|
+
its(:rate) { should be == Rational(0, 1) }
|
109
|
+
its(:gross_income) { should be == 0 }
|
110
|
+
its(:net_income) { should be == 0 }
|
111
|
+
its(:taxes) { should be == 0 }
|
112
|
+
end
|
113
|
+
|
114
|
+
describe "from gross income of 1000" do
|
115
|
+
let(:tax_year) { 2004 }
|
116
|
+
let(:income) { 1000 }
|
117
|
+
its(:rate) { should be == Rational(0, 1) }
|
118
|
+
its(:gross_income) { should be == 1000 }
|
119
|
+
its(:net_income) { should be == 1000 }
|
120
|
+
its(:taxes) { should be == 0 }
|
121
|
+
end
|
122
|
+
|
123
|
+
describe "from gross income of 10000" do
|
124
|
+
let(:tax_year) { 2004 }
|
125
|
+
let(:income) { 10000 }
|
126
|
+
its(:rate) { should be == Rational(11, 250) }
|
127
|
+
its(:gross_income) { should be == 10000 }
|
128
|
+
its(:net_income) { should be == "9560.065".to_d }
|
129
|
+
its(:taxes) { should be == "439.935".to_d }
|
130
|
+
end
|
131
|
+
|
132
|
+
describe "from gross income of 100000" do
|
133
|
+
let(:tax_year) { 2004 }
|
134
|
+
let(:income) { 100000 }
|
135
|
+
its(:rate) { should be == Rational(37, 97) }
|
136
|
+
its(:gross_income) { should be == 100000 }
|
137
|
+
its(:net_income) { should be == "61856.475".to_d }
|
138
|
+
its(:taxes) { should be == "38143.525".to_d }
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "from gross income of 100000000" do
|
142
|
+
let(:tax_year) { 2004 }
|
143
|
+
let(:income) { 100000000 }
|
144
|
+
its(:rate) { should be == Rational(103, 217) }
|
145
|
+
its(:gross_income) { should be == 100000000 }
|
146
|
+
its(:net_income) { should be == "52534331.475".to_d }
|
147
|
+
its(:taxes) { should be == "47465668.525".to_d }
|
148
|
+
end
|
149
|
+
|
150
|
+
describe "from net income of 0" do
|
151
|
+
let(:type) { :net }
|
152
|
+
let(:tax_year) { 2004 }
|
153
|
+
let(:income) { 0 }
|
154
|
+
its(:rate) { should be == Rational(0, 1) }
|
155
|
+
its(:gross_income) { should be == 0 }
|
156
|
+
its(:net_income) { should be == 0 }
|
157
|
+
its(:taxes) { should be == 0 }
|
158
|
+
end
|
159
|
+
|
160
|
+
describe "from net income of 1000" do
|
161
|
+
let(:type) { :net }
|
162
|
+
let(:tax_year) { 2004 }
|
163
|
+
let(:income) { 1000 }
|
164
|
+
its(:rate) { should be == Rational(11, 200) }
|
165
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
166
|
+
its(:net_income) { should be == 1000 }
|
167
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
168
|
+
end
|
169
|
+
|
170
|
+
describe "from net income of 10000" do
|
171
|
+
let(:type) { :net }
|
172
|
+
let(:tax_year) { 2004 }
|
173
|
+
let(:income) { 10000 }
|
174
|
+
its(:rate) { should be == Rational(20, 201) }
|
175
|
+
its(:gross_income) { should be == "11105.010582010582".to_d }
|
176
|
+
its(:net_income) { should be == 10000 }
|
177
|
+
its(:taxes) { should be == "1105.010582010582".to_d }
|
178
|
+
end
|
179
|
+
|
180
|
+
describe "from net income of 100000" do
|
181
|
+
let(:type) { :net }
|
182
|
+
let(:tax_year) { 2004 }
|
183
|
+
let(:income) { 100000 }
|
184
|
+
its(:rate) { should be == Rational(161, 386) }
|
185
|
+
its(:gross_income) { should be == "171555.10582010582".to_d }
|
186
|
+
its(:net_income) { should be == 100000 }
|
187
|
+
its(:taxes) { should be == "71555.10582010582".to_d }
|
188
|
+
end
|
189
|
+
|
190
|
+
describe "from net income of 100000000" do
|
191
|
+
let(:type) { :net }
|
192
|
+
let(:tax_year) { 2004 }
|
193
|
+
let(:income) { 100000000 }
|
194
|
+
its(:rate) { should be == Rational(92, 197) }
|
195
|
+
its(:gross_income) { should be == "187622204.82010582".to_d }
|
196
|
+
its(:net_income) { should be == 100000000 }
|
197
|
+
its(:taxes) { should be == "87622204.82010582".to_d }
|
198
|
+
end
|
27
199
|
end
|
28
200
|
|
29
|
-
describe "
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
201
|
+
describe "tax year 2005" do
|
202
|
+
|
203
|
+
describe "from gross income of 0" do
|
204
|
+
let(:tax_year) { 2005 }
|
205
|
+
let(:income) { 0 }
|
206
|
+
its(:rate) { should be == Rational(0, 1) }
|
207
|
+
its(:gross_income) { should be == 0 }
|
208
|
+
its(:net_income) { should be == 0 }
|
209
|
+
its(:taxes) { should be == 0 }
|
210
|
+
end
|
211
|
+
|
212
|
+
describe "from gross income of 1000" do
|
213
|
+
let(:tax_year) { 2005 }
|
214
|
+
let(:income) { 1000 }
|
215
|
+
its(:rate) { should be == Rational(0, 1) }
|
216
|
+
its(:gross_income) { should be == 1000 }
|
217
|
+
its(:net_income) { should be == 1000 }
|
218
|
+
its(:taxes) { should be == 0 }
|
219
|
+
end
|
220
|
+
|
221
|
+
describe "from gross income of 10000" do
|
222
|
+
let(:tax_year) { 2005 }
|
223
|
+
let(:income) { 10000 }
|
224
|
+
its(:rate) { should be == Rational(11, 262) }
|
225
|
+
its(:gross_income) { should be == 10000 }
|
226
|
+
its(:net_income) { should be == "9580.11".to_d }
|
227
|
+
its(:taxes) { should be == "419.89".to_d }
|
228
|
+
end
|
229
|
+
|
230
|
+
describe "from gross income of 100000" do
|
231
|
+
let(:tax_year) { 2005 }
|
232
|
+
let(:income) { 100000 }
|
233
|
+
its(:rate) { should be == Rational(73, 203) }
|
234
|
+
its(:gross_income) { should be == 100000 }
|
235
|
+
its(:net_income) { should be == "64039.27".to_d }
|
236
|
+
its(:taxes) { should be == "35960.73".to_d }
|
237
|
+
end
|
238
|
+
|
239
|
+
describe "from gross income of 100000000" do
|
240
|
+
let(:tax_year) { 2005 }
|
241
|
+
let(:income) { 100000000 }
|
242
|
+
its(:rate) { should be == Rational(206, 465) }
|
243
|
+
its(:gross_income) { should be == 100000000 }
|
244
|
+
its(:net_income) { should be == "55698349.27".to_d }
|
245
|
+
its(:taxes) { should be == "44301650.73".to_d }
|
246
|
+
end
|
247
|
+
|
248
|
+
describe "from net income of 0" do
|
249
|
+
let(:type) { :net }
|
250
|
+
let(:tax_year) { 2005 }
|
251
|
+
let(:income) { 0 }
|
252
|
+
its(:rate) { should be == Rational(0, 1) }
|
253
|
+
its(:gross_income) { should be == 0 }
|
254
|
+
its(:net_income) { should be == 0 }
|
255
|
+
its(:taxes) { should be == 0 }
|
256
|
+
end
|
257
|
+
|
258
|
+
describe "from net income of 1000" do
|
259
|
+
let(:type) { :net }
|
260
|
+
let(:tax_year) { 2005 }
|
261
|
+
let(:income) { 1000 }
|
262
|
+
its(:rate) { should be == Rational(11, 200) }
|
263
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
264
|
+
its(:net_income) { should be == 1000 }
|
265
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
266
|
+
end
|
267
|
+
|
268
|
+
describe "from net income of 10000" do
|
269
|
+
let(:type) { :net }
|
270
|
+
let(:tax_year) { 2005 }
|
271
|
+
let(:income) { 10000 }
|
272
|
+
its(:rate) { should be == Rational(41, 421) }
|
273
|
+
its(:gross_income) { should be == "11079.010582010582".to_d }
|
274
|
+
its(:net_income) { should be == 10000 }
|
275
|
+
its(:taxes) { should be == "1079.010582010582".to_d }
|
276
|
+
end
|
277
|
+
|
278
|
+
describe "from net income of 100000" do
|
279
|
+
let(:type) { :net }
|
280
|
+
let(:tax_year) { 2005 }
|
281
|
+
let(:income) { 100000 }
|
282
|
+
its(:rate) { should be == Rational(166, 423) }
|
283
|
+
its(:gross_income) { should be == "164589.10582010582".to_d }
|
284
|
+
its(:net_income) { should be == 100000 }
|
285
|
+
its(:taxes) { should be == "64589.10582010582".to_d }
|
286
|
+
end
|
287
|
+
|
288
|
+
describe "from net income of 100000000" do
|
289
|
+
let(:type) { :net }
|
290
|
+
let(:tax_year) { 2005 }
|
291
|
+
let(:income) { 100000000 }
|
292
|
+
its(:rate) { should be == Rational(79, 180) }
|
293
|
+
its(:gross_income) { should be == "178220253.82010582".to_d }
|
294
|
+
its(:net_income) { should be == 100000000 }
|
295
|
+
its(:taxes) { should be == "78220253.82010582".to_d }
|
296
|
+
end
|
35
297
|
end
|
36
298
|
|
37
|
-
describe "
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
299
|
+
describe "tax year 2007" do
|
300
|
+
|
301
|
+
describe "from gross income of 0" do
|
302
|
+
let(:tax_year) { 2007 }
|
303
|
+
let(:income) { 0 }
|
304
|
+
its(:rate) { should be == Rational(0, 1) }
|
305
|
+
its(:gross_income) { should be == 0 }
|
306
|
+
its(:net_income) { should be == 0 }
|
307
|
+
its(:taxes) { should be == 0 }
|
308
|
+
end
|
309
|
+
|
310
|
+
describe "from gross income of 1000" do
|
311
|
+
let(:tax_year) { 2007 }
|
312
|
+
let(:income) { 1000 }
|
313
|
+
its(:rate) { should be == Rational(0, 1) }
|
314
|
+
its(:gross_income) { should be == 1000 }
|
315
|
+
its(:net_income) { should be == 1000 }
|
316
|
+
its(:taxes) { should be == 0 }
|
317
|
+
end
|
318
|
+
|
319
|
+
describe "from gross income of 10000" do
|
320
|
+
let(:tax_year) { 2007 }
|
321
|
+
let(:income) { 10000 }
|
322
|
+
its(:rate) { should be == Rational(11, 262) }
|
323
|
+
its(:gross_income) { should be == 10000 }
|
324
|
+
its(:net_income) { should be == "9580.11".to_d }
|
325
|
+
its(:taxes) { should be == "419.89".to_d }
|
326
|
+
end
|
327
|
+
|
328
|
+
describe "from gross income of 100000" do
|
329
|
+
let(:tax_year) { 2007 }
|
330
|
+
let(:income) { 100000 }
|
331
|
+
its(:rate) { should be == Rational(73, 203) }
|
332
|
+
its(:gross_income) { should be == 100000 }
|
333
|
+
its(:net_income) { should be == "64039.27".to_d }
|
334
|
+
its(:taxes) { should be == "35960.73".to_d }
|
335
|
+
end
|
336
|
+
|
337
|
+
describe "from gross income of 100000000" do
|
338
|
+
let(:tax_year) { 2007 }
|
339
|
+
let(:income) { 100000000 }
|
340
|
+
its(:rate) { should be == Rational(383, 807) }
|
341
|
+
its(:gross_income) { should be == 100000000 }
|
342
|
+
its(:net_income) { should be == "52541261.77".to_d }
|
343
|
+
its(:taxes) { should be == "47458738.23".to_d }
|
344
|
+
end
|
345
|
+
|
346
|
+
describe "from net income of 0" do
|
347
|
+
let(:type) { :net }
|
348
|
+
let(:tax_year) { 2007 }
|
349
|
+
let(:income) { 0 }
|
350
|
+
its(:rate) { should be == Rational(0, 1) }
|
351
|
+
its(:gross_income) { should be == 0 }
|
352
|
+
its(:net_income) { should be == 0 }
|
353
|
+
its(:taxes) { should be == 0 }
|
354
|
+
end
|
355
|
+
|
356
|
+
describe "from net income of 1000" do
|
357
|
+
let(:type) { :net }
|
358
|
+
let(:tax_year) { 2007 }
|
359
|
+
let(:income) { 1000 }
|
360
|
+
its(:rate) { should be == Rational(11, 200) }
|
361
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
362
|
+
its(:net_income) { should be == 1000 }
|
363
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
364
|
+
end
|
365
|
+
|
366
|
+
describe "from net income of 10000" do
|
367
|
+
let(:type) { :net }
|
368
|
+
let(:tax_year) { 2007 }
|
369
|
+
let(:income) { 10000 }
|
370
|
+
its(:rate) { should be == Rational(41, 421) }
|
371
|
+
its(:gross_income) { should be == "11079.010582010582".to_d }
|
372
|
+
its(:net_income) { should be == 10000 }
|
373
|
+
its(:taxes) { should be == "1079.010582010582".to_d }
|
374
|
+
end
|
375
|
+
|
376
|
+
describe "from net income of 100000" do
|
377
|
+
let(:type) { :net }
|
378
|
+
let(:tax_year) { 2007 }
|
379
|
+
let(:income) { 100000 }
|
380
|
+
its(:rate) { should be == Rational(166, 423) }
|
381
|
+
its(:gross_income) { should be == "164589.10582010582".to_d }
|
382
|
+
its(:net_income) { should be == 100000 }
|
383
|
+
its(:taxes) { should be == "64589.10582010582".to_d }
|
384
|
+
end
|
385
|
+
|
386
|
+
describe "from net income of 100000000" do
|
387
|
+
let(:type) { :net }
|
388
|
+
let(:tax_year) { 2007 }
|
389
|
+
let(:income) { 100000000 }
|
390
|
+
its(:rate) { should be == Rational(99, 212) }
|
391
|
+
its(:gross_income) { should be == "187610260.82010582".to_d }
|
392
|
+
its(:net_income) { should be == 100000000 }
|
393
|
+
its(:taxes) { should be == "87610260.82010582".to_d }
|
394
|
+
end
|
43
395
|
end
|
44
396
|
|
45
|
-
describe "
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
397
|
+
describe "tax year 2009" do
|
398
|
+
|
399
|
+
describe "from gross income of 0" do
|
400
|
+
let(:tax_year) { 2009 }
|
401
|
+
let(:income) { 0 }
|
402
|
+
its(:rate) { should be == Rational(0, 1) }
|
403
|
+
its(:gross_income) { should be == 0 }
|
404
|
+
its(:net_income) { should be == 0 }
|
405
|
+
its(:taxes) { should be == 0 }
|
406
|
+
end
|
407
|
+
|
408
|
+
describe "from gross income of 1000" do
|
409
|
+
let(:tax_year) { 2009 }
|
410
|
+
let(:income) { 1000 }
|
411
|
+
its(:rate) { should be == Rational(0, 1) }
|
412
|
+
its(:gross_income) { should be == 1000 }
|
413
|
+
its(:net_income) { should be == 1000 }
|
414
|
+
its(:taxes) { should be == 0 }
|
415
|
+
end
|
416
|
+
|
417
|
+
describe "from gross income of 10000" do
|
418
|
+
let(:tax_year) { 2009 }
|
419
|
+
let(:income) { 10000 }
|
420
|
+
its(:rate) { should be == Rational(16, 437) }
|
421
|
+
its(:gross_income) { should be == 10000 }
|
422
|
+
its(:net_income) { should be == "9633.915".to_d }
|
423
|
+
its(:taxes) { should be == "366.085".to_d }
|
424
|
+
end
|
425
|
+
|
426
|
+
describe "from gross income of 100000" do
|
427
|
+
let(:tax_year) { 2009 }
|
428
|
+
let(:income) { 100000 }
|
429
|
+
its(:rate) { should be == Rational(237, 662) }
|
430
|
+
its(:gross_income) { should be == 100000 }
|
431
|
+
its(:net_income) { should be == "64198.575".to_d }
|
432
|
+
its(:taxes) { should be == "35801.425".to_d }
|
433
|
+
end
|
434
|
+
|
435
|
+
describe "from gross income of 100000000" do
|
436
|
+
let(:tax_year) { 2009 }
|
437
|
+
let(:income) { 100000000 }
|
438
|
+
its(:rate) { should be == Rational(28, 59) }
|
439
|
+
its(:gross_income) { should be == 100000000 }
|
440
|
+
its(:net_income) { should be == "52541432.68".to_d }
|
441
|
+
its(:taxes) { should be == "47458567.32".to_d }
|
442
|
+
end
|
443
|
+
|
444
|
+
describe "from net income of 0" do
|
445
|
+
let(:type) { :net }
|
446
|
+
let(:tax_year) { 2009 }
|
447
|
+
let(:income) { 0 }
|
448
|
+
its(:rate) { should be == Rational(0, 1) }
|
449
|
+
its(:gross_income) { should be == 0 }
|
450
|
+
its(:net_income) { should be == 0 }
|
451
|
+
its(:taxes) { should be == 0 }
|
452
|
+
end
|
453
|
+
|
454
|
+
describe "from net income of 1000" do
|
455
|
+
let(:type) { :net }
|
456
|
+
let(:tax_year) { 2009 }
|
457
|
+
let(:income) { 1000 }
|
458
|
+
its(:rate) { should be == Rational(11, 200) }
|
459
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
460
|
+
its(:net_income) { should be == 1000 }
|
461
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
462
|
+
end
|
463
|
+
|
464
|
+
describe "from net income of 10000" do
|
465
|
+
let(:type) { :net }
|
466
|
+
let(:tax_year) { 2009 }
|
467
|
+
let(:income) { 10000 }
|
468
|
+
its(:rate) { should be == Rational(10, 109) }
|
469
|
+
its(:gross_income) { should be == "11010.010582010582".to_d }
|
470
|
+
its(:net_income) { should be == 10000 }
|
471
|
+
its(:taxes) { should be == "1010.010582010582".to_d }
|
472
|
+
end
|
473
|
+
|
474
|
+
describe "from net income of 100000" do
|
475
|
+
let(:type) { :net }
|
476
|
+
let(:tax_year) { 2009 }
|
477
|
+
let(:income) { 100000 }
|
478
|
+
its(:rate) { should be == Rational(110, 281) }
|
479
|
+
its(:gross_income) { should be == "164328.10582010582".to_d }
|
480
|
+
its(:net_income) { should be == 100000 }
|
481
|
+
its(:taxes) { should be == "64328.10582010582".to_d }
|
482
|
+
end
|
483
|
+
|
484
|
+
describe "from net income of 100000000" do
|
485
|
+
let(:type) { :net }
|
486
|
+
let(:tax_year) { 2009 }
|
487
|
+
let(:income) { 100000000 }
|
488
|
+
its(:rate) { should be == Rational(99, 212) }
|
489
|
+
its(:gross_income) { should be == "187609966.82010582".to_d }
|
490
|
+
its(:net_income) { should be == 100000000 }
|
491
|
+
its(:taxes) { should be == "87609966.82010582".to_d }
|
492
|
+
end
|
52
493
|
end
|
53
494
|
|
54
|
-
describe "
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
495
|
+
describe "tax year 2010" do
|
496
|
+
|
497
|
+
describe "from gross income of 0" do
|
498
|
+
let(:tax_year) { 2010 }
|
499
|
+
let(:income) { 0 }
|
500
|
+
its(:rate) { should be == Rational(0, 1) }
|
501
|
+
its(:gross_income) { should be == 0 }
|
502
|
+
its(:net_income) { should be == 0 }
|
503
|
+
its(:taxes) { should be == 0 }
|
504
|
+
end
|
505
|
+
|
506
|
+
describe "from gross income of 1000" do
|
507
|
+
let(:tax_year) { 2010 }
|
508
|
+
let(:income) { 1000 }
|
509
|
+
its(:rate) { should be == Rational(0, 1) }
|
510
|
+
its(:gross_income) { should be == 1000 }
|
511
|
+
its(:net_income) { should be == 1000 }
|
512
|
+
its(:taxes) { should be == 0 }
|
513
|
+
end
|
514
|
+
|
515
|
+
describe "from gross income of 10000" do
|
516
|
+
let(:tax_year) { 2010 }
|
517
|
+
let(:income) { 10000 }
|
518
|
+
its(:rate) { should be == Rational(10, 301) }
|
519
|
+
its(:gross_income) { should be == 10000 }
|
520
|
+
its(:net_income) { should be == "9667.675".to_d }
|
521
|
+
its(:taxes) { should be == "332.325".to_d }
|
522
|
+
end
|
523
|
+
|
524
|
+
describe "from gross income of 100000" do
|
525
|
+
let(:tax_year) { 2010 }
|
526
|
+
let(:income) { 100000 }
|
527
|
+
its(:rate) { should be == Rational(96, 269) }
|
528
|
+
its(:gross_income) { should be == 100000 }
|
529
|
+
its(:net_income) { should be == "64312.515".to_d }
|
530
|
+
its(:taxes) { should be == "35687.485".to_d }
|
531
|
+
end
|
532
|
+
|
533
|
+
describe "from gross income of 100000000" do
|
534
|
+
let(:tax_year) { 2010 }
|
535
|
+
let(:income) { 100000000 }
|
536
|
+
its(:rate) { should be == Rational(28, 59) }
|
537
|
+
its(:gross_income) { should be == 100000000 }
|
538
|
+
its(:net_income) { should be == "52541558.225".to_d }
|
539
|
+
its(:taxes) { should be == "47458441.775".to_d }
|
540
|
+
end
|
541
|
+
|
542
|
+
describe "from net income of 0" do
|
543
|
+
let(:type) { :net }
|
544
|
+
let(:tax_year) { 2010 }
|
545
|
+
let(:income) { 0 }
|
546
|
+
its(:rate) { should be == Rational(0, 1) }
|
547
|
+
its(:gross_income) { should be == 0 }
|
548
|
+
its(:net_income) { should be == 0 }
|
549
|
+
its(:taxes) { should be == 0 }
|
550
|
+
end
|
551
|
+
|
552
|
+
describe "from net income of 1000" do
|
553
|
+
let(:type) { :net }
|
554
|
+
let(:tax_year) { 2010 }
|
555
|
+
let(:income) { 1000 }
|
556
|
+
its(:rate) { should be == Rational(11, 200) }
|
557
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
558
|
+
its(:net_income) { should be == 1000 }
|
559
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
560
|
+
end
|
561
|
+
|
562
|
+
describe "from net income of 10000" do
|
563
|
+
let(:type) { :net }
|
564
|
+
let(:tax_year) { 2010 }
|
565
|
+
let(:income) { 10000 }
|
566
|
+
its(:rate) { should be == Rational(25, 283) }
|
567
|
+
its(:gross_income) { should be == "10969.010582010582".to_d }
|
568
|
+
its(:net_income) { should be == 10000 }
|
569
|
+
its(:taxes) { should be == "969.010582010582".to_d }
|
570
|
+
end
|
571
|
+
|
572
|
+
describe "from net income of 100000" do
|
573
|
+
let(:type) { :net }
|
574
|
+
let(:tax_year) { 2010 }
|
575
|
+
let(:income) { 100000 }
|
576
|
+
its(:rate) { should be == Rational(127, 325) }
|
577
|
+
its(:gross_income) { should be == "164143.10582010582".to_d }
|
578
|
+
its(:net_income) { should be == 100000 }
|
579
|
+
its(:taxes) { should be == "64143.10582010582".to_d }
|
580
|
+
end
|
581
|
+
|
582
|
+
describe "from net income of 100000000" do
|
583
|
+
let(:type) { :net }
|
584
|
+
let(:tax_year) { 2010 }
|
585
|
+
let(:income) { 100000000 }
|
586
|
+
its(:rate) { should be == Rational(99, 212) }
|
587
|
+
its(:gross_income) { should be == "187609750.82010582".to_d }
|
588
|
+
its(:net_income) { should be == 100000000 }
|
589
|
+
its(:taxes) { should be == "87609750.82010582".to_d }
|
590
|
+
end
|
61
591
|
end
|
62
592
|
|
63
|
-
describe "
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
593
|
+
describe "tax year 2013" do
|
594
|
+
|
595
|
+
describe "from gross income of 0" do
|
596
|
+
let(:tax_year) { 2013 }
|
597
|
+
let(:income) { 0 }
|
598
|
+
its(:rate) { should be == Rational(0, 1) }
|
599
|
+
its(:gross_income) { should be == 0 }
|
600
|
+
its(:net_income) { should be == 0 }
|
601
|
+
its(:taxes) { should be == 0 }
|
602
|
+
end
|
603
|
+
|
604
|
+
describe "from gross income of 1000" do
|
605
|
+
let(:tax_year) { 2013 }
|
606
|
+
let(:income) { 1000 }
|
607
|
+
its(:rate) { should be == Rational(0, 1) }
|
608
|
+
its(:gross_income) { should be == 1000 }
|
609
|
+
its(:net_income) { should be == 1000 }
|
610
|
+
its(:taxes) { should be == 0 }
|
611
|
+
end
|
612
|
+
|
613
|
+
describe "from gross income of 10000" do
|
614
|
+
let(:tax_year) { 2013 }
|
615
|
+
let(:income) { 10000 }
|
616
|
+
its(:rate) { should be == Rational(4, 129) }
|
617
|
+
its(:gross_income) { should be == 10000 }
|
618
|
+
its(:net_income) { should be == "9689.83".to_d }
|
619
|
+
its(:taxes) { should be == "310.17".to_d }
|
620
|
+
end
|
621
|
+
|
622
|
+
describe "from gross income of 100000" do
|
623
|
+
let(:tax_year) { 2013 }
|
624
|
+
let(:income) { 100000 }
|
625
|
+
its(:rate) { should be == Rational(97, 272) }
|
626
|
+
its(:gross_income) { should be == 100000 }
|
627
|
+
its(:net_income) { should be == "64337.835".to_d }
|
628
|
+
its(:taxes) { should be == "35662.165".to_d }
|
629
|
+
end
|
630
|
+
|
631
|
+
describe "from gross income of 100000000" do
|
632
|
+
let(:tax_year) { 2013 }
|
633
|
+
let(:income) { 100000000 }
|
634
|
+
its(:rate) { should be == Rational(28, 59) }
|
635
|
+
its(:gross_income) { should be == 100000000 }
|
636
|
+
its(:net_income) { should be == "52541583.545".to_d }
|
637
|
+
its(:taxes) { should be == "47458416.455".to_d }
|
638
|
+
end
|
639
|
+
|
640
|
+
describe "from net income of 0" do
|
641
|
+
let(:type) { :net }
|
642
|
+
let(:tax_year) { 2013 }
|
643
|
+
let(:income) { 0 }
|
644
|
+
its(:rate) { should be == Rational(0, 1) }
|
645
|
+
its(:gross_income) { should be == 0 }
|
646
|
+
its(:net_income) { should be == 0 }
|
647
|
+
its(:taxes) { should be == 0 }
|
648
|
+
end
|
649
|
+
|
650
|
+
describe "from net income of 1000" do
|
651
|
+
let(:type) { :net }
|
652
|
+
let(:tax_year) { 2013 }
|
653
|
+
let(:income) { 1000 }
|
654
|
+
its(:rate) { should be == Rational(11, 200) }
|
655
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
656
|
+
its(:net_income) { should be == 1000 }
|
657
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
658
|
+
end
|
659
|
+
|
660
|
+
describe "from net income of 10000" do
|
661
|
+
let(:type) { :net }
|
662
|
+
let(:tax_year) { 2013 }
|
663
|
+
let(:income) { 10000 }
|
664
|
+
its(:rate) { should be == Rational(13, 151) }
|
665
|
+
its(:gross_income) { should be == "10942.010582010582".to_d }
|
666
|
+
its(:net_income) { should be == 10000 }
|
667
|
+
its(:taxes) { should be == "942.010582010582".to_d }
|
668
|
+
end
|
669
|
+
|
670
|
+
describe "from net income of 100000" do
|
671
|
+
let(:type) { :net }
|
672
|
+
let(:tax_year) { 2013 }
|
673
|
+
let(:income) { 100000 }
|
674
|
+
its(:rate) { should be == Rational(25, 64) }
|
675
|
+
its(:gross_income) { should be == "164102.10582010582".to_d }
|
676
|
+
its(:net_income) { should be == 100000 }
|
677
|
+
its(:taxes) { should be == "64102.10582010582".to_d }
|
678
|
+
end
|
679
|
+
|
680
|
+
describe "from net income of 100000000" do
|
681
|
+
let(:type) { :net }
|
682
|
+
let(:tax_year) { 2013 }
|
683
|
+
let(:income) { 100000000 }
|
684
|
+
its(:rate) { should be == Rational(99, 212) }
|
685
|
+
its(:gross_income) { should be == "187609706.82010582".to_d }
|
686
|
+
its(:net_income) { should be == 100000000 }
|
687
|
+
its(:taxes) { should be == "87609706.82010582".to_d }
|
688
|
+
end
|
70
689
|
end
|
71
690
|
|
72
|
-
describe "
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
691
|
+
describe "tax year 2014" do
|
692
|
+
|
693
|
+
describe "from gross income of 0" do
|
694
|
+
let(:tax_year) { 2014 }
|
695
|
+
let(:income) { 0 }
|
696
|
+
its(:rate) { should be == Rational(0, 1) }
|
697
|
+
its(:gross_income) { should be == 0 }
|
698
|
+
its(:net_income) { should be == 0 }
|
699
|
+
its(:taxes) { should be == 0 }
|
700
|
+
end
|
701
|
+
|
702
|
+
describe "from gross income of 1000" do
|
703
|
+
let(:tax_year) { 2014 }
|
704
|
+
let(:income) { 1000 }
|
705
|
+
its(:rate) { should be == Rational(0, 1) }
|
706
|
+
its(:gross_income) { should be == 1000 }
|
707
|
+
its(:net_income) { should be == 1000 }
|
708
|
+
its(:taxes) { should be == 0 }
|
709
|
+
end
|
710
|
+
|
711
|
+
describe "from gross income of 10000" do
|
712
|
+
let(:tax_year) { 2014 }
|
713
|
+
let(:income) { 10000 }
|
714
|
+
its(:rate) { should be == Rational(26, 963) }
|
715
|
+
its(:gross_income) { should be == 10000 }
|
716
|
+
its(:net_income) { should be == "9729.92".to_d }
|
717
|
+
its(:taxes) { should be == "270.08".to_d }
|
718
|
+
end
|
719
|
+
|
720
|
+
describe "from gross income of 100000" do
|
721
|
+
let(:tax_year) { 2014 }
|
722
|
+
let(:income) { 100000 }
|
723
|
+
its(:rate) { should be == Rational(26, 73) }
|
724
|
+
its(:gross_income) { should be == 100000 }
|
725
|
+
its(:net_income) { should be == "64383.2".to_d }
|
726
|
+
its(:taxes) { should be == "35616.8".to_d }
|
727
|
+
end
|
728
|
+
|
729
|
+
describe "from gross income of 100000000" do
|
730
|
+
let(:tax_year) { 2014 }
|
731
|
+
let(:income) { 100000000 }
|
732
|
+
its(:rate) { should be == Rational(28, 59) }
|
733
|
+
its(:gross_income) { should be == 100000000 }
|
734
|
+
its(:net_income) { should be == "52541628.91".to_d }
|
735
|
+
its(:taxes) { should be == "47458371.09".to_d }
|
736
|
+
end
|
737
|
+
|
738
|
+
describe "from net income of 0" do
|
739
|
+
let(:type) { :net }
|
740
|
+
let(:tax_year) { 2014 }
|
741
|
+
let(:income) { 0 }
|
742
|
+
its(:rate) { should be == Rational(0, 1) }
|
743
|
+
its(:gross_income) { should be == 0 }
|
744
|
+
its(:net_income) { should be == 0 }
|
745
|
+
its(:taxes) { should be == 0 }
|
746
|
+
end
|
747
|
+
|
748
|
+
describe "from net income of 1000" do
|
749
|
+
let(:type) { :net }
|
750
|
+
let(:tax_year) { 2014 }
|
751
|
+
let(:income) { 1000 }
|
752
|
+
its(:rate) { should be == Rational(11, 200) }
|
753
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
754
|
+
its(:net_income) { should be == 1000 }
|
755
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
756
|
+
end
|
757
|
+
|
758
|
+
describe "from net income of 10000" do
|
759
|
+
let(:type) { :net }
|
760
|
+
let(:tax_year) { 2014 }
|
761
|
+
let(:income) { 10000 }
|
762
|
+
its(:rate) { should be == Rational(27, 329) }
|
763
|
+
its(:gross_income) { should be == "10894.010582010582".to_d }
|
764
|
+
its(:net_income) { should be == 10000 }
|
765
|
+
its(:taxes) { should be == "894.010582010582".to_d }
|
766
|
+
end
|
767
|
+
|
768
|
+
describe "from net income of 100000" do
|
769
|
+
let(:type) { :net }
|
770
|
+
let(:tax_year) { 2014 }
|
771
|
+
let(:income) { 100000 }
|
772
|
+
its(:rate) { should be == Rational(89, 228) }
|
773
|
+
its(:gross_income) { should be == "164027.10582010582".to_d }
|
774
|
+
its(:net_income) { should be == 100000 }
|
775
|
+
its(:taxes) { should be == "64027.10582010582".to_d }
|
776
|
+
end
|
777
|
+
|
778
|
+
describe "from net income of 100000000" do
|
779
|
+
let(:type) { :net }
|
780
|
+
let(:tax_year) { 2014 }
|
781
|
+
let(:income) { 100000000 }
|
782
|
+
its(:rate) { should be == Rational(99, 212) }
|
783
|
+
its(:gross_income) { should be == "187609628.82010582".to_d }
|
784
|
+
its(:net_income) { should be == 100000000 }
|
785
|
+
its(:taxes) { should be == "87609628.82010582".to_d }
|
786
|
+
end
|
79
787
|
end
|
80
788
|
|
81
|
-
describe "
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
789
|
+
describe "tax year 2015" do
|
790
|
+
|
791
|
+
describe "from gross income of 0" do
|
792
|
+
let(:tax_year) { 2015 }
|
793
|
+
let(:income) { 0 }
|
794
|
+
its(:rate) { should be == Rational(0, 1) }
|
795
|
+
its(:gross_income) { should be == 0 }
|
796
|
+
its(:net_income) { should be == 0 }
|
797
|
+
its(:taxes) { should be == 0 }
|
798
|
+
end
|
799
|
+
|
800
|
+
describe "from gross income of 1000" do
|
801
|
+
let(:tax_year) { 2015 }
|
802
|
+
let(:income) { 1000 }
|
803
|
+
its(:rate) { should be == Rational(0, 1) }
|
804
|
+
its(:gross_income) { should be == 1000 }
|
805
|
+
its(:net_income) { should be == 1000 }
|
806
|
+
its(:taxes) { should be == 0 }
|
807
|
+
end
|
808
|
+
|
809
|
+
describe "from gross income of 10000" do
|
810
|
+
let(:tax_year) { 2015 }
|
811
|
+
let(:income) { 10000 }
|
812
|
+
its(:rate) { should be == Rational(1, 40) }
|
813
|
+
its(:gross_income) { should be == 10000 }
|
814
|
+
its(:net_income) { should be == "9749.965".to_d }
|
815
|
+
its(:taxes) { should be == "250.035".to_d }
|
816
|
+
end
|
817
|
+
|
818
|
+
describe "from gross income of 100000" do
|
819
|
+
let(:tax_year) { 2015 }
|
820
|
+
let(:income) { 100000 }
|
821
|
+
its(:rate) { should be == Rational(21, 59) }
|
822
|
+
its(:gross_income) { should be == 100000 }
|
823
|
+
its(:net_income) { should be == "64406.41".to_d }
|
824
|
+
its(:taxes) { should be == "35593.59".to_d }
|
825
|
+
end
|
826
|
+
|
827
|
+
describe "from gross income of 100000000" do
|
828
|
+
let(:tax_year) { 2015 }
|
829
|
+
let(:income) { 100000000 }
|
830
|
+
its(:rate) { should be == Rational(28, 59) }
|
831
|
+
its(:gross_income) { should be == 100000000 }
|
832
|
+
its(:net_income) { should be == "52541652.12".to_d }
|
833
|
+
its(:taxes) { should be == "47458347.88".to_d }
|
834
|
+
end
|
835
|
+
|
836
|
+
describe "from net income of 0" do
|
837
|
+
let(:type) { :net }
|
838
|
+
let(:tax_year) { 2015 }
|
839
|
+
let(:income) { 0 }
|
840
|
+
its(:rate) { should be == Rational(0, 1) }
|
841
|
+
its(:gross_income) { should be == 0 }
|
842
|
+
its(:net_income) { should be == 0 }
|
843
|
+
its(:taxes) { should be == 0 }
|
844
|
+
end
|
845
|
+
|
846
|
+
describe "from net income of 1000" do
|
847
|
+
let(:type) { :net }
|
848
|
+
let(:tax_year) { 2015 }
|
849
|
+
let(:income) { 1000 }
|
850
|
+
its(:rate) { should be == Rational(11, 200) }
|
851
|
+
its(:gross_income) { should be == "1058.2010582010582".to_d }
|
852
|
+
its(:net_income) { should be == 1000 }
|
853
|
+
its(:taxes) { should be == "58.2010582010582".to_d }
|
854
|
+
end
|
855
|
+
|
856
|
+
describe "from net income of 10000" do
|
857
|
+
let(:type) { :net }
|
858
|
+
let(:tax_year) { 2015 }
|
859
|
+
let(:income) { 10000 }
|
860
|
+
its(:rate) { should be == Rational(69, 862) }
|
861
|
+
its(:gross_income) { should be == "10870.010582010582".to_d }
|
862
|
+
its(:net_income) { should be == 10000 }
|
863
|
+
its(:taxes) { should be == "870.010582010582".to_d }
|
864
|
+
end
|
865
|
+
|
866
|
+
describe "from net income of 100000" do
|
867
|
+
let(:type) { :net }
|
868
|
+
let(:tax_year) { 2015 }
|
869
|
+
let(:income) { 100000 }
|
870
|
+
its(:rate) { should be == Rational(199, 510) }
|
871
|
+
its(:gross_income) { should be == "163989.10582010582".to_d }
|
872
|
+
its(:net_income) { should be == 100000 }
|
873
|
+
its(:taxes) { should be == "63989.10582010582".to_d }
|
874
|
+
end
|
875
|
+
|
876
|
+
describe "from net income of 100000000" do
|
877
|
+
let(:type) { :net }
|
878
|
+
let(:tax_year) { 2015 }
|
879
|
+
let(:income) { 100000000 }
|
880
|
+
its(:rate) { should be == Rational(99, 212) }
|
881
|
+
its(:gross_income) { should be == "187609588.82010582".to_d }
|
882
|
+
its(:net_income) { should be == 100000000 }
|
883
|
+
its(:taxes) { should be == "87609588.82010582".to_d }
|
884
|
+
end
|
88
885
|
end
|
89
886
|
end
|