income-tax 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (718) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +4 -0
  3. data/Gemfile +11 -0
  4. data/Gemfile.lock +60 -0
  5. data/LICENSE +22 -0
  6. data/income-tax.gemspec +12 -0
  7. data/lib/income-tax.rb +1 -0
  8. data/lib/income_tax/countries/afghanistan.rb +10 -0
  9. data/lib/income_tax/countries/aland.rb +10 -0
  10. data/lib/income_tax/countries/albania.rb +12 -0
  11. data/lib/income_tax/countries/algeria.rb +13 -0
  12. data/lib/income_tax/countries/american_samoa.rb +10 -0
  13. data/lib/income_tax/countries/andorra.rb +9 -0
  14. data/lib/income_tax/countries/angola.rb +23 -0
  15. data/lib/income_tax/countries/anguilla.rb +8 -0
  16. data/lib/income_tax/countries/antigua_and_barbuda.rb +11 -0
  17. data/lib/income_tax/countries/argentina.rb +16 -0
  18. data/lib/income_tax/countries/armenia.rb +11 -0
  19. data/lib/income_tax/countries/aruba.rb +23 -0
  20. data/lib/income_tax/countries/australia.rb +32 -0
  21. data/lib/income_tax/countries/austria.rb +14 -0
  22. data/lib/income_tax/countries/azerbaijan.rb +11 -0
  23. data/lib/income_tax/countries/bahamas.rb +8 -0
  24. data/lib/income_tax/countries/bahrain.rb +8 -0
  25. data/lib/income_tax/countries/bangladesh.rb +42 -0
  26. data/lib/income_tax/countries/barbados.rb +28 -0
  27. data/lib/income_tax/countries/belarus.rb +9 -0
  28. data/lib/income_tax/countries/belgium.rb +14 -0
  29. data/lib/income_tax/countries/belize.rb +11 -0
  30. data/lib/income_tax/countries/benin.rb +13 -0
  31. data/lib/income_tax/countries/bermuda.rb +8 -0
  32. data/lib/income_tax/countries/bhutan.rb +14 -0
  33. data/lib/income_tax/countries/bolivia.rb +9 -0
  34. data/lib/income_tax/countries/bosnia_and_herzegovina.rb +9 -0
  35. data/lib/income_tax/countries/botswana.rb +11 -0
  36. data/lib/income_tax/countries/bouvet_island.rb +10 -0
  37. data/lib/income_tax/countries/brazil.rb +14 -0
  38. data/lib/income_tax/countries/british_indian_ocean_territory.rb +10 -0
  39. data/lib/income_tax/countries/brunei.rb +8 -0
  40. data/lib/income_tax/countries/bulgaria.rb +9 -0
  41. data/lib/income_tax/countries/burkina_faso.rb +16 -0
  42. data/lib/income_tax/countries/burundi.rb +12 -0
  43. data/lib/income_tax/countries/cambodia.rb +14 -0
  44. data/lib/income_tax/countries/cameroon.rb +13 -0
  45. data/lib/income_tax/countries/canada.rb +13 -0
  46. data/lib/income_tax/countries/cape_verde.rb +14 -0
  47. data/lib/income_tax/countries/caribbean_netherlands.rb +15 -0
  48. data/lib/income_tax/countries/cayman_islands.rb +8 -0
  49. data/lib/income_tax/countries/central_african_republic.rb +11 -0
  50. data/lib/income_tax/countries/chad.rb +17 -0
  51. data/lib/income_tax/countries/chile.rb +20 -0
  52. data/lib/income_tax/countries/china.rb +17 -0
  53. data/lib/income_tax/countries/christmas_island.rb +8 -0
  54. data/lib/income_tax/countries/cocos_keeling_islands.rb +8 -0
  55. data/lib/income_tax/countries/colombia.rb +14 -0
  56. data/lib/income_tax/countries/comoros.rb +16 -0
  57. data/lib/income_tax/countries/congo.rb +9 -0
  58. data/lib/income_tax/countries/congo_republic.rb +14 -0
  59. data/lib/income_tax/countries/cook_islands.rb +13 -0
  60. data/lib/income_tax/countries/costa_rica.rb +30 -0
  61. data/lib/income_tax/countries/croatia.rb +12 -0
  62. data/lib/income_tax/countries/cuba.rb +12 -0
  63. data/lib/income_tax/countries/curacao.rb +15 -0
  64. data/lib/income_tax/countries/cyprus.rb +14 -0
  65. data/lib/income_tax/countries/czech_republic.rb +9 -0
  66. data/lib/income_tax/countries/denmark.rb +12 -0
  67. data/lib/income_tax/countries/djibouti.rb +14 -0
  68. data/lib/income_tax/countries/dominica.rb +13 -0
  69. data/lib/income_tax/countries/dominican_republic.rb +13 -0
  70. data/lib/income_tax/countries/ecuador.rb +18 -0
  71. data/lib/income_tax/countries/egypt.rb +14 -0
  72. data/lib/income_tax/countries/el_salvador.rb +9 -0
  73. data/lib/income_tax/countries/equatorial_guinea.rb +16 -0
  74. data/lib/income_tax/countries/eritrea.rb +9 -0
  75. data/lib/income_tax/countries/estonia.rb +9 -0
  76. data/lib/income_tax/countries/ethiopia.rb +16 -0
  77. data/lib/income_tax/countries/falkland_islands.rb +12 -0
  78. data/lib/income_tax/countries/faroe_islands.rb +9 -0
  79. data/lib/income_tax/countries/fiji.rb +20 -0
  80. data/lib/income_tax/countries/finland.rb +14 -0
  81. data/lib/income_tax/countries/france.rb +34 -0
  82. data/lib/income_tax/countries/french_guiana.rb +8 -0
  83. data/lib/income_tax/countries/french_polynesia.rb +8 -0
  84. data/lib/income_tax/countries/french_southern_territories.rb +8 -0
  85. data/lib/income_tax/countries/gabon.rb +17 -0
  86. data/lib/income_tax/countries/gambia.rb +15 -0
  87. data/lib/income_tax/countries/georgia.rb +9 -0
  88. data/lib/income_tax/countries/germany.rb +58 -0
  89. data/lib/income_tax/countries/ghana.rb +14 -0
  90. data/lib/income_tax/countries/gibraltar.rb +15 -0
  91. data/lib/income_tax/countries/greece.rb +11 -0
  92. data/lib/income_tax/countries/greenland.rb +9 -0
  93. data/lib/income_tax/countries/grenada.rb +11 -0
  94. data/lib/income_tax/countries/guadeloupe.rb +14 -0
  95. data/lib/income_tax/countries/guam.rb +10 -0
  96. data/lib/income_tax/countries/guatemala.rb +13 -0
  97. data/lib/income_tax/countries/guernsey.rb +9 -0
  98. data/lib/income_tax/countries/guinea.rb +13 -0
  99. data/lib/income_tax/countries/guinea_bissau.rb +9 -0
  100. data/lib/income_tax/countries/guyana.rb +11 -0
  101. data/lib/income_tax/countries/haiti.rb +9 -0
  102. data/lib/income_tax/countries/heard_and_mcdonald_islands.rb +8 -0
  103. data/lib/income_tax/countries/honduras.rb +9 -0
  104. data/lib/income_tax/countries/hong_kong.rb +15 -0
  105. data/lib/income_tax/countries/hungary.rb +9 -0
  106. data/lib/income_tax/countries/iceland.rb +12 -0
  107. data/lib/income_tax/countries/india.rb +14 -0
  108. data/lib/income_tax/countries/indonesia.rb +14 -0
  109. data/lib/income_tax/countries/iran.rb +14 -0
  110. data/lib/income_tax/countries/iraq.rb +9 -0
  111. data/lib/income_tax/countries/ireland.rb +24 -0
  112. data/lib/income_tax/countries/isle_of_man.rb +11 -0
  113. data/lib/income_tax/countries/israel.rb +16 -0
  114. data/lib/income_tax/countries/italy.rb +14 -0
  115. data/lib/income_tax/countries/ivory_coast.rb +14 -0
  116. data/lib/income_tax/countries/jamaica.rb +11 -0
  117. data/lib/income_tax/countries/japan.rb +15 -0
  118. data/lib/income_tax/countries/jersey.rb +9 -0
  119. data/lib/income_tax/countries/jordan.rb +14 -0
  120. data/lib/income_tax/countries/kazakhstan.rb +9 -0
  121. data/lib/income_tax/countries/kenya.rb +14 -0
  122. data/lib/income_tax/countries/kiribati.rb +9 -0
  123. data/lib/income_tax/countries/kosovo.rb +13 -0
  124. data/lib/income_tax/countries/kuwait.rb +8 -0
  125. data/lib/income_tax/countries/kyrgyzstan.rb +9 -0
  126. data/lib/income_tax/countries/laos.rb +15 -0
  127. data/lib/income_tax/countries/latvia.rb +9 -0
  128. data/lib/income_tax/countries/lebanon.rb +15 -0
  129. data/lib/income_tax/countries/lesotho.rb +13 -0
  130. data/lib/income_tax/countries/liberia.rb +13 -0
  131. data/lib/income_tax/countries/libya.rb +12 -0
  132. data/lib/income_tax/countries/liechtenstein.rb +9 -0
  133. data/lib/income_tax/countries/lithuania.rb +9 -0
  134. data/lib/income_tax/countries/luxembourg.rb +33 -0
  135. data/lib/income_tax/countries/macao.rb +19 -0
  136. data/lib/income_tax/countries/macedonia.rb +9 -0
  137. data/lib/income_tax/countries/madagascar.rb +11 -0
  138. data/lib/income_tax/countries/malawi.rb +12 -0
  139. data/lib/income_tax/countries/malaysia.rb +18 -0
  140. data/lib/income_tax/countries/maldives.rb +8 -0
  141. data/lib/income_tax/countries/mali.rb +9 -0
  142. data/lib/income_tax/countries/malta.rb +36 -0
  143. data/lib/income_tax/countries/marshall_islands.rb +11 -0
  144. data/lib/income_tax/countries/martinique.rb +14 -0
  145. data/lib/income_tax/countries/mauritania.rb +12 -0
  146. data/lib/income_tax/countries/mauritius.rb +9 -0
  147. data/lib/income_tax/countries/mayotte.rb +8 -0
  148. data/lib/income_tax/countries/mexico.rb +20 -0
  149. data/lib/income_tax/countries/micronesia.rb +9 -0
  150. data/lib/income_tax/countries/moldova.rb +13 -0
  151. data/lib/income_tax/countries/monaco.rb +9 -0
  152. data/lib/income_tax/countries/mongolia.rb +9 -0
  153. data/lib/income_tax/countries/montenegro.rb +11 -0
  154. data/lib/income_tax/countries/montserrat.rb +14 -0
  155. data/lib/income_tax/countries/morocco.rb +15 -0
  156. data/lib/income_tax/countries/mozambique.rb +14 -0
  157. data/lib/income_tax/countries/myanmar.rb +15 -0
  158. data/lib/income_tax/countries/namibia.rb +16 -0
  159. data/lib/income_tax/countries/nauru.rb +8 -0
  160. data/lib/income_tax/countries/nepal.rb +28 -0
  161. data/lib/income_tax/countries/netherlands.rb +13 -0
  162. data/lib/income_tax/countries/netherlands_antilles.rb +15 -0
  163. data/lib/income_tax/countries/new_caledonia.rb +14 -0
  164. data/lib/income_tax/countries/new_zealand.rb +13 -0
  165. data/lib/income_tax/countries/nicaragua.rb +32 -0
  166. data/lib/income_tax/countries/niger.rb +16 -0
  167. data/lib/income_tax/countries/nigeria.rb +15 -0
  168. data/lib/income_tax/countries/niue.rb +13 -0
  169. data/lib/income_tax/countries/norfolk_island.rb +9 -0
  170. data/lib/income_tax/countries/north_korea.rb +8 -0
  171. data/lib/income_tax/countries/northern_mariana_islands.rb +10 -0
  172. data/lib/income_tax/countries/norway.rb +13 -0
  173. data/lib/income_tax/countries/oman.rb +8 -0
  174. data/lib/income_tax/countries/pakistan.rb +21 -0
  175. data/lib/income_tax/countries/palau.rb +12 -0
  176. data/lib/income_tax/countries/palestinian_territory.rb +15 -0
  177. data/lib/income_tax/countries/panama.rb +12 -0
  178. data/lib/income_tax/countries/papua_new_guinea.rb +15 -0
  179. data/lib/income_tax/countries/paraguay.rb +9 -0
  180. data/lib/income_tax/countries/peru.rb +11 -0
  181. data/lib/income_tax/countries/philippines.rb +16 -0
  182. data/lib/income_tax/countries/pitcairn.rb +12 -0
  183. data/lib/income_tax/countries/poland.rb +12 -0
  184. data/lib/income_tax/countries/portugal.rb +14 -0
  185. data/lib/income_tax/countries/puerto_rico.rb +9 -0
  186. data/lib/income_tax/countries/qatar.rb +8 -0
  187. data/lib/income_tax/countries/reunion.rb +8 -0
  188. data/lib/income_tax/countries/romania.rb +9 -0
  189. data/lib/income_tax/countries/russia.rb +9 -0
  190. data/lib/income_tax/countries/rwanda.rb +12 -0
  191. data/lib/income_tax/countries/saint_barthelemy.rb +8 -0
  192. data/lib/income_tax/countries/saint_helena.rb +9 -0
  193. data/lib/income_tax/countries/saint_kitts_and_nevis.rb +8 -0
  194. data/lib/income_tax/countries/saint_lucia.rb +14 -0
  195. data/lib/income_tax/countries/saint_martin.rb +14 -0
  196. data/lib/income_tax/countries/saint_pierre_and_miquelon.rb +21 -0
  197. data/lib/income_tax/countries/saint_vincent_and_the_grenedines.rb +13 -0
  198. data/lib/income_tax/countries/samoa.rb +13 -0
  199. data/lib/income_tax/countries/san_marino.rb +17 -0
  200. data/lib/income_tax/countries/sao_tome_and_principe.rb +9 -0
  201. data/lib/income_tax/countries/saudi_arabia.rb +8 -0
  202. data/lib/income_tax/countries/senegal.rb +19 -0
  203. data/lib/income_tax/countries/serbia.rb +13 -0
  204. data/lib/income_tax/countries/seychelles.rb +9 -0
  205. data/lib/income_tax/countries/sierra_leone.rb +13 -0
  206. data/lib/income_tax/countries/singapore.rb +43 -0
  207. data/lib/income_tax/countries/sint_maarten.rb +15 -0
  208. data/lib/income_tax/countries/slovakia.rb +11 -0
  209. data/lib/income_tax/countries/slovenia.rb +13 -0
  210. data/lib/income_tax/countries/solomon_islands.rb +16 -0
  211. data/lib/income_tax/countries/somalia.rb +15 -0
  212. data/lib/income_tax/countries/south_africa.rb +15 -0
  213. data/lib/income_tax/countries/south_georgia_and_the_south_sandwich_islands.rb +10 -0
  214. data/lib/income_tax/countries/south_korea.rb +13 -0
  215. data/lib/income_tax/countries/south_sudan.rb +12 -0
  216. data/lib/income_tax/countries/spain.rb +14 -0
  217. data/lib/income_tax/countries/sri_lanka.rb +9 -0
  218. data/lib/income_tax/countries/sudan.rb +9 -0
  219. data/lib/income_tax/countries/suriname.rb +14 -0
  220. data/lib/income_tax/countries/svalbard_and_jan_mayen.rb +9 -0
  221. data/lib/income_tax/countries/swaziland.rb +9 -0
  222. data/lib/income_tax/countries/sweden.rb +12 -0
  223. data/lib/income_tax/countries/switzerland/aargau.rb +12 -0
  224. data/lib/income_tax/countries/switzerland/appenzell_inner.rb +12 -0
  225. data/lib/income_tax/countries/switzerland/appenzell_outer.rb +11 -0
  226. data/lib/income_tax/countries/switzerland/basel_city.rb +11 -0
  227. data/lib/income_tax/countries/switzerland/basel_land.rb +11 -0
  228. data/lib/income_tax/countries/switzerland/bern.rb +10 -0
  229. data/lib/income_tax/countries/switzerland/canton.rb +36 -0
  230. data/lib/income_tax/countries/switzerland/data/aargau.dat +0 -0
  231. data/lib/income_tax/countries/switzerland/data/appenzell_inner.dat +0 -0
  232. data/lib/income_tax/countries/switzerland/data/appenzell_outer.dat +0 -0
  233. data/lib/income_tax/countries/switzerland/data/basel_city.dat +0 -0
  234. data/lib/income_tax/countries/switzerland/data/basel_land.dat +0 -0
  235. data/lib/income_tax/countries/switzerland/data/bern.dat +0 -0
  236. data/lib/income_tax/countries/switzerland/data/fribourg.dat +0 -0
  237. data/lib/income_tax/countries/switzerland/data/geneva.dat +0 -0
  238. data/lib/income_tax/countries/switzerland/data/glarus.dat +0 -0
  239. data/lib/income_tax/countries/switzerland/data/grisons.dat +0 -0
  240. data/lib/income_tax/countries/switzerland/data/jura.dat +0 -0
  241. data/lib/income_tax/countries/switzerland/data/lucerne.dat +0 -0
  242. data/lib/income_tax/countries/switzerland/data/neuchatel.dat +0 -0
  243. data/lib/income_tax/countries/switzerland/data/nidwalden.dat +0 -0
  244. data/lib/income_tax/countries/switzerland/data/obwalden.dat +0 -0
  245. data/lib/income_tax/countries/switzerland/data/schaffhausen.dat +0 -0
  246. data/lib/income_tax/countries/switzerland/data/schwyz.dat +0 -0
  247. data/lib/income_tax/countries/switzerland/data/solothurn.dat +0 -0
  248. data/lib/income_tax/countries/switzerland/data/st_gallen.dat +0 -0
  249. data/lib/income_tax/countries/switzerland/data/thurgau.dat +0 -0
  250. data/lib/income_tax/countries/switzerland/data/ticino.dat +0 -0
  251. data/lib/income_tax/countries/switzerland/data/uri.dat +0 -0
  252. data/lib/income_tax/countries/switzerland/data/valais.dat +0 -0
  253. data/lib/income_tax/countries/switzerland/data/vaud.dat +0 -0
  254. data/lib/income_tax/countries/switzerland/data/zug.dat +0 -0
  255. data/lib/income_tax/countries/switzerland/data/zurich.dat +0 -0
  256. data/lib/income_tax/countries/switzerland/federal.rb +46 -0
  257. data/lib/income_tax/countries/switzerland/fribourg.rb +11 -0
  258. data/lib/income_tax/countries/switzerland/geneva.rb +12 -0
  259. data/lib/income_tax/countries/switzerland/glarus.rb +12 -0
  260. data/lib/income_tax/countries/switzerland/grisons.rb +11 -0
  261. data/lib/income_tax/countries/switzerland/jura.rb +11 -0
  262. data/lib/income_tax/countries/switzerland/lucerne.rb +11 -0
  263. data/lib/income_tax/countries/switzerland/neuchatel.rb +12 -0
  264. data/lib/income_tax/countries/switzerland/nidwalden.rb +11 -0
  265. data/lib/income_tax/countries/switzerland/obwalden.rb +11 -0
  266. data/lib/income_tax/countries/switzerland/schaffhausen.rb +12 -0
  267. data/lib/income_tax/countries/switzerland/schwyz.rb +11 -0
  268. data/lib/income_tax/countries/switzerland/solothurn.rb +12 -0
  269. data/lib/income_tax/countries/switzerland/st_gallen.rb +12 -0
  270. data/lib/income_tax/countries/switzerland/thurgau.rb +12 -0
  271. data/lib/income_tax/countries/switzerland/ticino.rb +11 -0
  272. data/lib/income_tax/countries/switzerland/uri.rb +11 -0
  273. data/lib/income_tax/countries/switzerland/valais.rb +10 -0
  274. data/lib/income_tax/countries/switzerland/vaud.rb +11 -0
  275. data/lib/income_tax/countries/switzerland/zug.rb +12 -0
  276. data/lib/income_tax/countries/switzerland/zurich.rb +12 -0
  277. data/lib/income_tax/countries/switzerland.rb +62 -0
  278. data/lib/income_tax/countries/syria.rb +12 -0
  279. data/lib/income_tax/countries/taiwan.rb +14 -0
  280. data/lib/income_tax/countries/tajikistan.rb +13 -0
  281. data/lib/income_tax/countries/tanzania.rb +53 -0
  282. data/lib/income_tax/countries/thailand.rb +17 -0
  283. data/lib/income_tax/countries/timor_leste.rb +11 -0
  284. data/lib/income_tax/countries/togo.rb +9 -0
  285. data/lib/income_tax/countries/tokelau.rb +15 -0
  286. data/lib/income_tax/countries/tonga.rb +12 -0
  287. data/lib/income_tax/countries/trinidad_and_tobago.rb +11 -0
  288. data/lib/income_tax/countries/tunisia.rb +15 -0
  289. data/lib/income_tax/countries/turkey.rb +13 -0
  290. data/lib/income_tax/countries/turkmenistan.rb +9 -0
  291. data/lib/income_tax/countries/turks_and_caicos_islands.rb +8 -0
  292. data/lib/income_tax/countries/tuvalu.rb +9 -0
  293. data/lib/income_tax/countries/uganda.rb +13 -0
  294. data/lib/income_tax/countries/ukraine.rb +9 -0
  295. data/lib/income_tax/countries/united_arab_emirates.rb +8 -0
  296. data/lib/income_tax/countries/united_kingdom.rb +13 -0
  297. data/lib/income_tax/countries/united_states/alabama.rb +24 -0
  298. data/lib/income_tax/countries/united_states/alaska.rb +10 -0
  299. data/lib/income_tax/countries/united_states/arizona.rb +29 -0
  300. data/lib/income_tax/countries/united_states/arkansas.rb +29 -0
  301. data/lib/income_tax/countries/united_states/california.rb +39 -0
  302. data/lib/income_tax/countries/united_states/colorado.rb +10 -0
  303. data/lib/income_tax/countries/united_states/connecticut.rb +31 -0
  304. data/lib/income_tax/countries/united_states/dc.rb +16 -0
  305. data/lib/income_tax/countries/united_states/delaware.rb +31 -0
  306. data/lib/income_tax/countries/united_states/federal.rb +40 -0
  307. data/lib/income_tax/countries/united_states/florida.rb +10 -0
  308. data/lib/income_tax/countries/united_states/georgia.rb +32 -0
  309. data/lib/income_tax/countries/united_states/hawaii.rb +43 -0
  310. data/lib/income_tax/countries/united_states/idaho.rb +34 -0
  311. data/lib/income_tax/countries/united_states/illinois.rb +10 -0
  312. data/lib/income_tax/countries/united_states/indiana.rb +10 -0
  313. data/lib/income_tax/countries/united_states/iowa.rb +39 -0
  314. data/lib/income_tax/countries/united_states/kansas.rb +23 -0
  315. data/lib/income_tax/countries/united_states/kentucky.rb +31 -0
  316. data/lib/income_tax/countries/united_states/louisiana.rb +26 -0
  317. data/lib/income_tax/countries/united_states/maine.rb +23 -0
  318. data/lib/income_tax/countries/united_states/maryland.rb +35 -0
  319. data/lib/income_tax/countries/united_states/massachusetts.rb +10 -0
  320. data/lib/income_tax/countries/united_states/michigan.rb +10 -0
  321. data/lib/income_tax/countries/united_states/minnesota.rb +27 -0
  322. data/lib/income_tax/countries/united_states/mississippi.rb +25 -0
  323. data/lib/income_tax/countries/united_states/missouri.rb +40 -0
  324. data/lib/income_tax/countries/united_states/montana.rb +34 -0
  325. data/lib/income_tax/countries/united_states/nebraska.rb +27 -0
  326. data/lib/income_tax/countries/united_states/nevada.rb +10 -0
  327. data/lib/income_tax/countries/united_states/new_hampshire.rb +10 -0
  328. data/lib/income_tax/countries/united_states/new_jersey.rb +32 -0
  329. data/lib/income_tax/countries/united_states/new_mexico.rb +27 -0
  330. data/lib/income_tax/countries/united_states/new_york.rb +35 -0
  331. data/lib/income_tax/countries/united_states/north_carolina.rb +10 -0
  332. data/lib/income_tax/countries/united_states/north_dakota.rb +17 -0
  333. data/lib/income_tax/countries/united_states/ohio.rb +37 -0
  334. data/lib/income_tax/countries/united_states/oklahoma.rb +33 -0
  335. data/lib/income_tax/countries/united_states/oregon.rb +28 -0
  336. data/lib/income_tax/countries/united_states/pennsylvania.rb +10 -0
  337. data/lib/income_tax/countries/united_states/rhode_island.rb +25 -0
  338. data/lib/income_tax/countries/united_states/south_carolina.rb +17 -0
  339. data/lib/income_tax/countries/united_states/south_dakota.rb +10 -0
  340. data/lib/income_tax/countries/united_states/state.rb +34 -0
  341. data/lib/income_tax/countries/united_states/tennessee.rb +10 -0
  342. data/lib/income_tax/countries/united_states/texas.rb +10 -0
  343. data/lib/income_tax/countries/united_states/utah.rb +10 -0
  344. data/lib/income_tax/countries/united_states/vermont.rb +29 -0
  345. data/lib/income_tax/countries/united_states/virginia.rb +16 -0
  346. data/lib/income_tax/countries/united_states/washington.rb +10 -0
  347. data/lib/income_tax/countries/united_states/west_virginia.rb +29 -0
  348. data/lib/income_tax/countries/united_states/wisconsin.rb +27 -0
  349. data/lib/income_tax/countries/united_states/wyoming.rb +10 -0
  350. data/lib/income_tax/countries/united_states.rb +93 -0
  351. data/lib/income_tax/countries/united_states_minor_outlying_islands.rb +8 -0
  352. data/lib/income_tax/countries/uruguay.rb +16 -0
  353. data/lib/income_tax/countries/uzbekistan.rb +15 -0
  354. data/lib/income_tax/countries/vanuatu.rb +8 -0
  355. data/lib/income_tax/countries/vatican.rb +8 -0
  356. data/lib/income_tax/countries/venezuela.rb +20 -0
  357. data/lib/income_tax/countries/vietnam.rb +17 -0
  358. data/lib/income_tax/countries/virgin_islands_british.rb +9 -0
  359. data/lib/income_tax/countries/virgin_islands_us.rb +8 -0
  360. data/lib/income_tax/countries/wallis_and_futuna.rb +8 -0
  361. data/lib/income_tax/countries/western_sahara.rb +8 -0
  362. data/lib/income_tax/countries/yemen.rb +11 -0
  363. data/lib/income_tax/countries/zambia.rb +13 -0
  364. data/lib/income_tax/countries/zimbabwe.rb +17 -0
  365. data/lib/income_tax/countries.rb +5 -0
  366. data/lib/income_tax/factory.rb +66 -0
  367. data/lib/income_tax/helpers.rb +25 -0
  368. data/lib/income_tax/models/delegate.rb +30 -0
  369. data/lib/income_tax/models/fixed_rate.rb +14 -0
  370. data/lib/income_tax/models/generic.rb +212 -0
  371. data/lib/income_tax/models/no_taxes.rb +7 -0
  372. data/lib/income_tax/models/not_implemented.rb +6 -0
  373. data/lib/income_tax/models/progressive.rb +103 -0
  374. data/lib/income_tax/models.rb +10 -0
  375. data/lib/income_tax/rate.rb +152 -0
  376. data/lib/income_tax/register.rb +35 -0
  377. data/lib/income_tax/version.rb +3 -0
  378. data/lib/income_tax.rb +17 -0
  379. data/locations.md +1763 -0
  380. data/readme.md +137 -0
  381. data/script/generate_switzerland.rb +87 -0
  382. data/spec/income_tax/countries/afghanistan_spec.rb +89 -0
  383. data/spec/income_tax/countries/aland_spec.rb +89 -0
  384. data/spec/income_tax/countries/albania_spec.rb +89 -0
  385. data/spec/income_tax/countries/algeria_spec.rb +89 -0
  386. data/spec/income_tax/countries/american_samoa_spec.rb +89 -0
  387. data/spec/income_tax/countries/andorra_spec.rb +89 -0
  388. data/spec/income_tax/countries/angola_spec.rb +89 -0
  389. data/spec/income_tax/countries/anguilla_spec.rb +89 -0
  390. data/spec/income_tax/countries/antigua_and_barbuda_spec.rb +89 -0
  391. data/spec/income_tax/countries/argentina_spec.rb +89 -0
  392. data/spec/income_tax/countries/armenia_spec.rb +89 -0
  393. data/spec/income_tax/countries/aruba_spec.rb +89 -0
  394. data/spec/income_tax/countries/australia_spec.rb +89 -0
  395. data/spec/income_tax/countries/austria_spec.rb +89 -0
  396. data/spec/income_tax/countries/azerbaijan_spec.rb +89 -0
  397. data/spec/income_tax/countries/bahamas_spec.rb +89 -0
  398. data/spec/income_tax/countries/bahrain_spec.rb +89 -0
  399. data/spec/income_tax/countries/bangladesh_spec.rb +89 -0
  400. data/spec/income_tax/countries/barbados_spec.rb +89 -0
  401. data/spec/income_tax/countries/belarus_spec.rb +89 -0
  402. data/spec/income_tax/countries/belgium_spec.rb +89 -0
  403. data/spec/income_tax/countries/belize_spec.rb +89 -0
  404. data/spec/income_tax/countries/benin_spec.rb +89 -0
  405. data/spec/income_tax/countries/bermuda_spec.rb +89 -0
  406. data/spec/income_tax/countries/bhutan_spec.rb +89 -0
  407. data/spec/income_tax/countries/bolivia_spec.rb +89 -0
  408. data/spec/income_tax/countries/bosnia_and_herzegovina_spec.rb +89 -0
  409. data/spec/income_tax/countries/botswana_spec.rb +89 -0
  410. data/spec/income_tax/countries/bouvet_island_spec.rb +89 -0
  411. data/spec/income_tax/countries/brazil_spec.rb +89 -0
  412. data/spec/income_tax/countries/british_indian_ocean_territory_spec.rb +89 -0
  413. data/spec/income_tax/countries/brunei_spec.rb +89 -0
  414. data/spec/income_tax/countries/bulgaria_spec.rb +89 -0
  415. data/spec/income_tax/countries/burkina_faso_spec.rb +89 -0
  416. data/spec/income_tax/countries/burundi_spec.rb +89 -0
  417. data/spec/income_tax/countries/cambodia_spec.rb +89 -0
  418. data/spec/income_tax/countries/cameroon_spec.rb +89 -0
  419. data/spec/income_tax/countries/canada_spec.rb +89 -0
  420. data/spec/income_tax/countries/cape_verde_spec.rb +89 -0
  421. data/spec/income_tax/countries/caribbean_netherlands_spec.rb +89 -0
  422. data/spec/income_tax/countries/cayman_islands_spec.rb +89 -0
  423. data/spec/income_tax/countries/central_african_republic_spec.rb +89 -0
  424. data/spec/income_tax/countries/chad_spec.rb +89 -0
  425. data/spec/income_tax/countries/chile_spec.rb +89 -0
  426. data/spec/income_tax/countries/china_spec.rb +89 -0
  427. data/spec/income_tax/countries/christmas_island_spec.rb +89 -0
  428. data/spec/income_tax/countries/cocos_keeling_islands_spec.rb +89 -0
  429. data/spec/income_tax/countries/colombia_spec.rb +89 -0
  430. data/spec/income_tax/countries/comoros_spec.rb +89 -0
  431. data/spec/income_tax/countries/congo_republic_spec.rb +89 -0
  432. data/spec/income_tax/countries/congo_spec.rb +89 -0
  433. data/spec/income_tax/countries/cook_islands_spec.rb +89 -0
  434. data/spec/income_tax/countries/costa_rica_spec.rb +89 -0
  435. data/spec/income_tax/countries/croatia_spec.rb +89 -0
  436. data/spec/income_tax/countries/cuba_spec.rb +89 -0
  437. data/spec/income_tax/countries/curacao_spec.rb +89 -0
  438. data/spec/income_tax/countries/cyprus_spec.rb +89 -0
  439. data/spec/income_tax/countries/czech_republic_spec.rb +89 -0
  440. data/spec/income_tax/countries/denmark_spec.rb +89 -0
  441. data/spec/income_tax/countries/djibouti_spec.rb +89 -0
  442. data/spec/income_tax/countries/dominica_spec.rb +89 -0
  443. data/spec/income_tax/countries/dominican_republic_spec.rb +89 -0
  444. data/spec/income_tax/countries/ecuador_spec.rb +89 -0
  445. data/spec/income_tax/countries/egypt_spec.rb +89 -0
  446. data/spec/income_tax/countries/el_salvador_spec.rb +89 -0
  447. data/spec/income_tax/countries/equatorial_guinea_spec.rb +89 -0
  448. data/spec/income_tax/countries/eritrea_spec.rb +89 -0
  449. data/spec/income_tax/countries/estonia_spec.rb +89 -0
  450. data/spec/income_tax/countries/ethiopia_spec.rb +89 -0
  451. data/spec/income_tax/countries/falkland_islands_spec.rb +89 -0
  452. data/spec/income_tax/countries/faroe_islands_spec.rb +89 -0
  453. data/spec/income_tax/countries/fiji_spec.rb +89 -0
  454. data/spec/income_tax/countries/finland_spec.rb +89 -0
  455. data/spec/income_tax/countries/france_spec.rb +89 -0
  456. data/spec/income_tax/countries/french_guiana_spec.rb +89 -0
  457. data/spec/income_tax/countries/french_polynesia_spec.rb +89 -0
  458. data/spec/income_tax/countries/french_southern_territories_spec.rb +89 -0
  459. data/spec/income_tax/countries/gabon_spec.rb +89 -0
  460. data/spec/income_tax/countries/gambia_spec.rb +89 -0
  461. data/spec/income_tax/countries/georgia_spec.rb +89 -0
  462. data/spec/income_tax/countries/germany_spec.rb +89 -0
  463. data/spec/income_tax/countries/ghana_spec.rb +89 -0
  464. data/spec/income_tax/countries/gibraltar_spec.rb +89 -0
  465. data/spec/income_tax/countries/greece_spec.rb +89 -0
  466. data/spec/income_tax/countries/greenland_spec.rb +89 -0
  467. data/spec/income_tax/countries/grenada_spec.rb +89 -0
  468. data/spec/income_tax/countries/guadeloupe_spec.rb +89 -0
  469. data/spec/income_tax/countries/guam_spec.rb +89 -0
  470. data/spec/income_tax/countries/guatemala_spec.rb +89 -0
  471. data/spec/income_tax/countries/guernsey_spec.rb +89 -0
  472. data/spec/income_tax/countries/guinea_bissau_spec.rb +89 -0
  473. data/spec/income_tax/countries/guinea_spec.rb +89 -0
  474. data/spec/income_tax/countries/guyana_spec.rb +89 -0
  475. data/spec/income_tax/countries/haiti_spec.rb +89 -0
  476. data/spec/income_tax/countries/heard_and_mcdonald_islands_spec.rb +89 -0
  477. data/spec/income_tax/countries/honduras_spec.rb +89 -0
  478. data/spec/income_tax/countries/hong_kong_spec.rb +89 -0
  479. data/spec/income_tax/countries/hungary_spec.rb +89 -0
  480. data/spec/income_tax/countries/iceland_spec.rb +89 -0
  481. data/spec/income_tax/countries/india_spec.rb +89 -0
  482. data/spec/income_tax/countries/indonesia_spec.rb +89 -0
  483. data/spec/income_tax/countries/iran_spec.rb +89 -0
  484. data/spec/income_tax/countries/iraq_spec.rb +89 -0
  485. data/spec/income_tax/countries/ireland_spec.rb +89 -0
  486. data/spec/income_tax/countries/isle_of_man_spec.rb +89 -0
  487. data/spec/income_tax/countries/israel_spec.rb +89 -0
  488. data/spec/income_tax/countries/italy_spec.rb +89 -0
  489. data/spec/income_tax/countries/ivory_coast_spec.rb +89 -0
  490. data/spec/income_tax/countries/jamaica_spec.rb +89 -0
  491. data/spec/income_tax/countries/japan_spec.rb +89 -0
  492. data/spec/income_tax/countries/jersey_spec.rb +89 -0
  493. data/spec/income_tax/countries/jordan_spec.rb +89 -0
  494. data/spec/income_tax/countries/kazakhstan_spec.rb +89 -0
  495. data/spec/income_tax/countries/kenya_spec.rb +89 -0
  496. data/spec/income_tax/countries/kiribati_spec.rb +89 -0
  497. data/spec/income_tax/countries/kosovo_spec.rb +89 -0
  498. data/spec/income_tax/countries/kuwait_spec.rb +89 -0
  499. data/spec/income_tax/countries/kyrgyzstan_spec.rb +89 -0
  500. data/spec/income_tax/countries/laos_spec.rb +89 -0
  501. data/spec/income_tax/countries/latvia_spec.rb +89 -0
  502. data/spec/income_tax/countries/lebanon_spec.rb +89 -0
  503. data/spec/income_tax/countries/lesotho_spec.rb +89 -0
  504. data/spec/income_tax/countries/liberia_spec.rb +89 -0
  505. data/spec/income_tax/countries/libya_spec.rb +89 -0
  506. data/spec/income_tax/countries/liechtenstein_spec.rb +89 -0
  507. data/spec/income_tax/countries/lithuania_spec.rb +89 -0
  508. data/spec/income_tax/countries/luxembourg_spec.rb +89 -0
  509. data/spec/income_tax/countries/macao_spec.rb +89 -0
  510. data/spec/income_tax/countries/macedonia_spec.rb +89 -0
  511. data/spec/income_tax/countries/madagascar_spec.rb +89 -0
  512. data/spec/income_tax/countries/malawi_spec.rb +89 -0
  513. data/spec/income_tax/countries/malaysia_spec.rb +89 -0
  514. data/spec/income_tax/countries/maldives_spec.rb +89 -0
  515. data/spec/income_tax/countries/mali_spec.rb +89 -0
  516. data/spec/income_tax/countries/malta_spec.rb +89 -0
  517. data/spec/income_tax/countries/marshall_islands_spec.rb +89 -0
  518. data/spec/income_tax/countries/martinique_spec.rb +89 -0
  519. data/spec/income_tax/countries/mauritania_spec.rb +89 -0
  520. data/spec/income_tax/countries/mauritius_spec.rb +89 -0
  521. data/spec/income_tax/countries/mayotte_spec.rb +89 -0
  522. data/spec/income_tax/countries/mexico_spec.rb +89 -0
  523. data/spec/income_tax/countries/micronesia_spec.rb +89 -0
  524. data/spec/income_tax/countries/moldova_spec.rb +89 -0
  525. data/spec/income_tax/countries/monaco_spec.rb +89 -0
  526. data/spec/income_tax/countries/mongolia_spec.rb +89 -0
  527. data/spec/income_tax/countries/montenegro_spec.rb +89 -0
  528. data/spec/income_tax/countries/montserrat_spec.rb +89 -0
  529. data/spec/income_tax/countries/morocco_spec.rb +89 -0
  530. data/spec/income_tax/countries/mozambique_spec.rb +89 -0
  531. data/spec/income_tax/countries/myanmar_spec.rb +89 -0
  532. data/spec/income_tax/countries/namibia_spec.rb +89 -0
  533. data/spec/income_tax/countries/nauru_spec.rb +89 -0
  534. data/spec/income_tax/countries/nepal_spec.rb +89 -0
  535. data/spec/income_tax/countries/netherlands_antilles_spec.rb +89 -0
  536. data/spec/income_tax/countries/netherlands_spec.rb +89 -0
  537. data/spec/income_tax/countries/new_caledonia_spec.rb +89 -0
  538. data/spec/income_tax/countries/new_zealand_spec.rb +89 -0
  539. data/spec/income_tax/countries/nicaragua_spec.rb +89 -0
  540. data/spec/income_tax/countries/niger_spec.rb +89 -0
  541. data/spec/income_tax/countries/nigeria_spec.rb +89 -0
  542. data/spec/income_tax/countries/niue_spec.rb +89 -0
  543. data/spec/income_tax/countries/norfolk_island_spec.rb +89 -0
  544. data/spec/income_tax/countries/north_korea_spec.rb +89 -0
  545. data/spec/income_tax/countries/northern_mariana_islands_spec.rb +89 -0
  546. data/spec/income_tax/countries/norway_spec.rb +89 -0
  547. data/spec/income_tax/countries/oman_spec.rb +89 -0
  548. data/spec/income_tax/countries/pakistan_spec.rb +89 -0
  549. data/spec/income_tax/countries/palau_spec.rb +89 -0
  550. data/spec/income_tax/countries/palestinian_territory_spec.rb +89 -0
  551. data/spec/income_tax/countries/panama_spec.rb +89 -0
  552. data/spec/income_tax/countries/papua_new_guinea_spec.rb +89 -0
  553. data/spec/income_tax/countries/paraguay_spec.rb +89 -0
  554. data/spec/income_tax/countries/peru_spec.rb +89 -0
  555. data/spec/income_tax/countries/philippines_spec.rb +89 -0
  556. data/spec/income_tax/countries/pitcairn_spec.rb +89 -0
  557. data/spec/income_tax/countries/poland_spec.rb +89 -0
  558. data/spec/income_tax/countries/portugal_spec.rb +89 -0
  559. data/spec/income_tax/countries/puerto_rico_spec.rb +89 -0
  560. data/spec/income_tax/countries/qatar_spec.rb +89 -0
  561. data/spec/income_tax/countries/reunion_spec.rb +89 -0
  562. data/spec/income_tax/countries/romania_spec.rb +89 -0
  563. data/spec/income_tax/countries/russia_spec.rb +89 -0
  564. data/spec/income_tax/countries/rwanda_spec.rb +89 -0
  565. data/spec/income_tax/countries/saint_barthelemy_spec.rb +89 -0
  566. data/spec/income_tax/countries/saint_helena_spec.rb +89 -0
  567. data/spec/income_tax/countries/saint_kitts_and_nevis_spec.rb +89 -0
  568. data/spec/income_tax/countries/saint_lucia_spec.rb +89 -0
  569. data/spec/income_tax/countries/saint_martin_spec.rb +89 -0
  570. data/spec/income_tax/countries/saint_pierre_and_miquelon_spec.rb +89 -0
  571. data/spec/income_tax/countries/saint_vincent_and_the_grenedines_spec.rb +89 -0
  572. data/spec/income_tax/countries/samoa_spec.rb +89 -0
  573. data/spec/income_tax/countries/san_marino_spec.rb +89 -0
  574. data/spec/income_tax/countries/sao_tome_and_principe_spec.rb +89 -0
  575. data/spec/income_tax/countries/saudi_arabia_spec.rb +89 -0
  576. data/spec/income_tax/countries/senegal_spec.rb +89 -0
  577. data/spec/income_tax/countries/serbia_spec.rb +89 -0
  578. data/spec/income_tax/countries/seychelles_spec.rb +89 -0
  579. data/spec/income_tax/countries/sierra_leone_spec.rb +89 -0
  580. data/spec/income_tax/countries/singapore_spec.rb +89 -0
  581. data/spec/income_tax/countries/sint_maarten_spec.rb +89 -0
  582. data/spec/income_tax/countries/slovakia_spec.rb +89 -0
  583. data/spec/income_tax/countries/slovenia_spec.rb +89 -0
  584. data/spec/income_tax/countries/solomon_islands_spec.rb +89 -0
  585. data/spec/income_tax/countries/somalia_spec.rb +89 -0
  586. data/spec/income_tax/countries/south_africa_spec.rb +89 -0
  587. data/spec/income_tax/countries/south_georgia_and_the_south_sandwich_islands_spec.rb +89 -0
  588. data/spec/income_tax/countries/south_korea_spec.rb +89 -0
  589. data/spec/income_tax/countries/south_sudan_spec.rb +89 -0
  590. data/spec/income_tax/countries/spain_spec.rb +89 -0
  591. data/spec/income_tax/countries/sri_lanka_spec.rb +89 -0
  592. data/spec/income_tax/countries/sudan_spec.rb +89 -0
  593. data/spec/income_tax/countries/suriname_spec.rb +89 -0
  594. data/spec/income_tax/countries/svalbard_and_jan_mayen_spec.rb +89 -0
  595. data/spec/income_tax/countries/swaziland_spec.rb +89 -0
  596. data/spec/income_tax/countries/sweden_spec.rb +89 -0
  597. data/spec/income_tax/countries/switzerland/aargau_spec.rb +89 -0
  598. data/spec/income_tax/countries/switzerland/appenzell_inner_spec.rb +89 -0
  599. data/spec/income_tax/countries/switzerland/appenzell_outer_spec.rb +89 -0
  600. data/spec/income_tax/countries/switzerland/basel_city_spec.rb +89 -0
  601. data/spec/income_tax/countries/switzerland/basel_land_spec.rb +89 -0
  602. data/spec/income_tax/countries/switzerland/bern_spec.rb +89 -0
  603. data/spec/income_tax/countries/switzerland/fribourg_spec.rb +89 -0
  604. data/spec/income_tax/countries/switzerland/geneva_spec.rb +89 -0
  605. data/spec/income_tax/countries/switzerland/glarus_spec.rb +89 -0
  606. data/spec/income_tax/countries/switzerland/grisons_spec.rb +89 -0
  607. data/spec/income_tax/countries/switzerland/jura_spec.rb +89 -0
  608. data/spec/income_tax/countries/switzerland/lucerne_spec.rb +89 -0
  609. data/spec/income_tax/countries/switzerland/neuchatel_spec.rb +89 -0
  610. data/spec/income_tax/countries/switzerland/nidwalden_spec.rb +89 -0
  611. data/spec/income_tax/countries/switzerland/obwalden_spec.rb +89 -0
  612. data/spec/income_tax/countries/switzerland/schaffhausen_spec.rb +89 -0
  613. data/spec/income_tax/countries/switzerland/schwyz_spec.rb +89 -0
  614. data/spec/income_tax/countries/switzerland/solothurn_spec.rb +89 -0
  615. data/spec/income_tax/countries/switzerland/st_gallen_spec.rb +89 -0
  616. data/spec/income_tax/countries/switzerland/thurgau_spec.rb +89 -0
  617. data/spec/income_tax/countries/switzerland/ticino_spec.rb +89 -0
  618. data/spec/income_tax/countries/switzerland/uri_spec.rb +89 -0
  619. data/spec/income_tax/countries/switzerland/valais_spec.rb +89 -0
  620. data/spec/income_tax/countries/switzerland/vaud_spec.rb +89 -0
  621. data/spec/income_tax/countries/switzerland/zug_spec.rb +89 -0
  622. data/spec/income_tax/countries/switzerland/zurich_spec.rb +89 -0
  623. data/spec/income_tax/countries/switzerland_spec.rb +89 -0
  624. data/spec/income_tax/countries/syria_spec.rb +89 -0
  625. data/spec/income_tax/countries/taiwan_spec.rb +89 -0
  626. data/spec/income_tax/countries/tajikistan_spec.rb +89 -0
  627. data/spec/income_tax/countries/tanzania_spec.rb +89 -0
  628. data/spec/income_tax/countries/thailand_spec.rb +89 -0
  629. data/spec/income_tax/countries/timor_leste_spec.rb +89 -0
  630. data/spec/income_tax/countries/togo_spec.rb +89 -0
  631. data/spec/income_tax/countries/tokelau_spec.rb +89 -0
  632. data/spec/income_tax/countries/tonga_spec.rb +89 -0
  633. data/spec/income_tax/countries/trinidad_and_tobago_spec.rb +89 -0
  634. data/spec/income_tax/countries/tunisia_spec.rb +89 -0
  635. data/spec/income_tax/countries/turkey_spec.rb +89 -0
  636. data/spec/income_tax/countries/turkmenistan_spec.rb +89 -0
  637. data/spec/income_tax/countries/turks_and_caicos_islands_spec.rb +89 -0
  638. data/spec/income_tax/countries/tuvalu_spec.rb +89 -0
  639. data/spec/income_tax/countries/uganda_spec.rb +89 -0
  640. data/spec/income_tax/countries/ukraine_spec.rb +89 -0
  641. data/spec/income_tax/countries/united_arab_emirates_spec.rb +89 -0
  642. data/spec/income_tax/countries/united_kingdom_spec.rb +89 -0
  643. data/spec/income_tax/countries/united_states/alabama_spec.rb +89 -0
  644. data/spec/income_tax/countries/united_states/alaska_spec.rb +89 -0
  645. data/spec/income_tax/countries/united_states/arizona_spec.rb +89 -0
  646. data/spec/income_tax/countries/united_states/arkansas_spec.rb +89 -0
  647. data/spec/income_tax/countries/united_states/california_spec.rb +89 -0
  648. data/spec/income_tax/countries/united_states/colorado_spec.rb +89 -0
  649. data/spec/income_tax/countries/united_states/connecticut_spec.rb +89 -0
  650. data/spec/income_tax/countries/united_states/dc_spec.rb +89 -0
  651. data/spec/income_tax/countries/united_states/delaware_spec.rb +89 -0
  652. data/spec/income_tax/countries/united_states/florida_spec.rb +89 -0
  653. data/spec/income_tax/countries/united_states/georgia_spec.rb +89 -0
  654. data/spec/income_tax/countries/united_states/hawaii_spec.rb +89 -0
  655. data/spec/income_tax/countries/united_states/idaho_spec.rb +89 -0
  656. data/spec/income_tax/countries/united_states/illinois_spec.rb +89 -0
  657. data/spec/income_tax/countries/united_states/indiana_spec.rb +89 -0
  658. data/spec/income_tax/countries/united_states/iowa_spec.rb +89 -0
  659. data/spec/income_tax/countries/united_states/kansas_spec.rb +89 -0
  660. data/spec/income_tax/countries/united_states/kentucky_spec.rb +89 -0
  661. data/spec/income_tax/countries/united_states/louisiana_spec.rb +89 -0
  662. data/spec/income_tax/countries/united_states/maine_spec.rb +89 -0
  663. data/spec/income_tax/countries/united_states/maryland_spec.rb +89 -0
  664. data/spec/income_tax/countries/united_states/massachusetts_spec.rb +89 -0
  665. data/spec/income_tax/countries/united_states/michigan_spec.rb +89 -0
  666. data/spec/income_tax/countries/united_states/minnesota_spec.rb +89 -0
  667. data/spec/income_tax/countries/united_states/mississippi_spec.rb +89 -0
  668. data/spec/income_tax/countries/united_states/missouri_spec.rb +89 -0
  669. data/spec/income_tax/countries/united_states/montana_spec.rb +89 -0
  670. data/spec/income_tax/countries/united_states/nebraska_spec.rb +89 -0
  671. data/spec/income_tax/countries/united_states/nevada_spec.rb +89 -0
  672. data/spec/income_tax/countries/united_states/new_hampshire_spec.rb +89 -0
  673. data/spec/income_tax/countries/united_states/new_jersey_spec.rb +89 -0
  674. data/spec/income_tax/countries/united_states/new_mexico_spec.rb +89 -0
  675. data/spec/income_tax/countries/united_states/new_york_spec.rb +89 -0
  676. data/spec/income_tax/countries/united_states/north_carolina_spec.rb +89 -0
  677. data/spec/income_tax/countries/united_states/north_dakota_spec.rb +89 -0
  678. data/spec/income_tax/countries/united_states/ohio_spec.rb +89 -0
  679. data/spec/income_tax/countries/united_states/oklahoma_spec.rb +89 -0
  680. data/spec/income_tax/countries/united_states/oregon_spec.rb +89 -0
  681. data/spec/income_tax/countries/united_states/pennsylvania_spec.rb +89 -0
  682. data/spec/income_tax/countries/united_states/rhode_island_spec.rb +89 -0
  683. data/spec/income_tax/countries/united_states/south_carolina_spec.rb +89 -0
  684. data/spec/income_tax/countries/united_states/south_dakota_spec.rb +89 -0
  685. data/spec/income_tax/countries/united_states/tennessee_spec.rb +89 -0
  686. data/spec/income_tax/countries/united_states/texas_spec.rb +89 -0
  687. data/spec/income_tax/countries/united_states/utah_spec.rb +89 -0
  688. data/spec/income_tax/countries/united_states/vermont_spec.rb +89 -0
  689. data/spec/income_tax/countries/united_states/virginia_spec.rb +89 -0
  690. data/spec/income_tax/countries/united_states/washington_spec.rb +89 -0
  691. data/spec/income_tax/countries/united_states/west_virginia_spec.rb +89 -0
  692. data/spec/income_tax/countries/united_states/wisconsin_spec.rb +89 -0
  693. data/spec/income_tax/countries/united_states/wyoming_spec.rb +89 -0
  694. data/spec/income_tax/countries/united_states_minor_outlying_islands_spec.rb +89 -0
  695. data/spec/income_tax/countries/united_states_spec.rb +89 -0
  696. data/spec/income_tax/countries/uruguay_spec.rb +89 -0
  697. data/spec/income_tax/countries/uzbekistan_spec.rb +89 -0
  698. data/spec/income_tax/countries/vanuatu_spec.rb +89 -0
  699. data/spec/income_tax/countries/vatican_spec.rb +89 -0
  700. data/spec/income_tax/countries/venezuela_spec.rb +89 -0
  701. data/spec/income_tax/countries/vietnam_spec.rb +89 -0
  702. data/spec/income_tax/countries/virgin_islands_british_spec.rb +89 -0
  703. data/spec/income_tax/countries/virgin_islands_us_spec.rb +89 -0
  704. data/spec/income_tax/countries/wallis_and_futuna_spec.rb +89 -0
  705. data/spec/income_tax/countries/western_sahara_spec.rb +89 -0
  706. data/spec/income_tax/countries/yemen_spec.rb +89 -0
  707. data/spec/income_tax/countries/zambia_spec.rb +89 -0
  708. data/spec/income_tax/countries/zimbabwe_spec.rb +89 -0
  709. data/spec/income_tax/models/fixed_rate_spec.rb +24 -0
  710. data/spec/income_tax/models/no_taxes_spec.rb +20 -0
  711. data/spec/income_tax/models/progressive_spec.rb +98 -0
  712. data/spec/income_tax/rate_spec.rb +257 -0
  713. data/spec/income_tax/register_spec.rb +14 -0
  714. data/spec/income_tax_spec.rb +9 -0
  715. data/spec/support/coverage.rb +16 -0
  716. data/spec/support/env.rb +12 -0
  717. data/spec/support.rb +3 -0
  718. metadata +760 -0
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStates::Vermont do
2
+ subject(:result) { IncomeTax::Countries::UnitedStates.new(income: income, income_type: type, state: 'Vermont') }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(1, 10) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == 900 }
18
+ its(:taxes) { should be == 100 }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(41, 337) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == "8783.45".to_d }
26
+ its(:taxes) { should be == "1216.55".to_d }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(56, 221) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "74659.7".to_d }
34
+ its(:taxes) { should be == "25340.3".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(97, 200) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "51500408.7".to_d }
42
+ its(:taxes) { should be == "48499591.3".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(1, 10) }
58
+ its(:gross_income) { should be == "1111.111111111111111".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "111.111111111111111".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(37, 314) }
67
+ its(:gross_income) { should be == "11335.631588042163459".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1335.631588042163459".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(103, 410) }
76
+ its(:gross_income) { should be == "133550.7659978308026".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "33550.7659978308026".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(180, 419) }
85
+ its(:gross_income) { should be == "175311957.802504627".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "75311957.802504627".to_d }
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStates::Virginia do
2
+ subject(:result) { IncomeTax::Countries::UnitedStates.new(income: income, income_type: type, state: 'Virginia') }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(35, 226) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == "845.125".to_d }
18
+ its(:taxes) { should be == "154.875".to_d }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(42, 305) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == "8623.025".to_d }
26
+ its(:taxes) { should be == "1376.975".to_d }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(74, 291) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "74570.25".to_d }
34
+ its(:taxes) { should be == "25429.75".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(82, 181) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "54695753.25".to_d }
42
+ its(:taxes) { should be == "45304246.75".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(62, 433) }
58
+ its(:gross_income) { should be == "1167.1060090702947845".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "167.1060090702947845".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(19, 145) }
67
+ its(:gross_income) { should be == "11507.92690058479531".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1507.92690058479531".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(60, 239) }
76
+ its(:gross_income) { should be == "133518.2112068965517".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "33518.2112068965517".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(63, 151) }
85
+ its(:gross_income) { should be == "171588112.364299892".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "71588112.364299892".to_d }
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStates::Washington do
2
+ subject(:result) { IncomeTax::Countries::UnitedStates.new(income: income, income_type: type, state: 'Washington') }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(1, 10) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == 900 }
18
+ its(:taxes) { should be == 100 }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(1, 10) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == 9000 }
26
+ its(:taxes) { should be == 1000 }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(63, 316) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "80062.75".to_d }
34
+ its(:taxes) { should be == "19937.25".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(142, 359) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "60445495.75".to_d }
42
+ its(:taxes) { should be == "39554504.25".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(1, 10) }
58
+ its(:gross_income) { should be == "1111.111111111111111".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "111.111111111111111".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(1, 10) }
67
+ its(:gross_income) { should be == "11111.1111111111111".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1111.1111111111111".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(139, 641) }
76
+ its(:gross_income) { should be == "127690.625".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "27690.625".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(74, 187) }
85
+ its(:gross_income) { should be == "165487589.817880794".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "65487589.817880794".to_d }
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStates::WestVirginia do
2
+ subject(:result) { IncomeTax::Countries::UnitedStates.new(income: income, income_type: type, state: 'West Virginia') }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(1, 10) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == 900 }
18
+ its(:taxes) { should be == 100 }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(31, 250) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == 8760 }
26
+ its(:taxes) { should be == 1240 }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(69, 274) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "74817.75".to_d }
34
+ its(:taxes) { should be == "25182.25".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(35, 76) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "53946750.75".to_d }
42
+ its(:taxes) { should be == "46053249.25".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(1, 10) }
58
+ its(:gross_income) { should be == "1111.111111111111111".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "111.111111111111111".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(36, 301) }
67
+ its(:gross_income) { should be == "11358.533791523482234".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1358.533791523482234".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(319, 1277) }
76
+ its(:gross_income) { should be == "133300.2506684491979".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "33300.2506684491979".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(92, 219) }
85
+ its(:gross_income) { should be == "172438119.2296454999".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "72438119.2296454999".to_d }
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStates::Wisconsin do
2
+ subject(:result) { IncomeTax::Countries::UnitedStates.new(income: income, income_type: type, state: 'Wisconsin') }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(14, 125) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == 888 }
18
+ its(:taxes) { should be == 112 }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(45, 328) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == 8628 }
26
+ its(:taxes) { should be == 1372 }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(67, 259) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "74131.21".to_d }
34
+ its(:taxes) { should be == "25868.79".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(59, 125) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "52799158.492".to_d }
42
+ its(:taxes) { should be == "47200841.508".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(56, 509) }
58
+ its(:gross_income) { should be == "1123.611111111111111".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "123.611111111111111".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(52, 399) }
67
+ its(:gross_income) { should be == "11498.6111111111111".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1498.6111111111111".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(33, 130) }
76
+ its(:gross_income) { should be == "134018.95104288915".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "34018.95104288915".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(239, 563) }
85
+ its(:gross_income) { should be == "173767326.967853723".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "73767326.967853723".to_d }
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStates::Wyoming do
2
+ subject(:result) { IncomeTax::Countries::UnitedStates.new(income: income, income_type: type, state: 'Wyoming') }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(1, 10) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == 900 }
18
+ its(:taxes) { should be == 100 }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(1, 10) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == 9000 }
26
+ its(:taxes) { should be == 1000 }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(63, 316) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "80062.75".to_d }
34
+ its(:taxes) { should be == "19937.25".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(142, 359) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "60445495.75".to_d }
42
+ its(:taxes) { should be == "39554504.25".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(1, 10) }
58
+ its(:gross_income) { should be == "1111.111111111111111".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "111.111111111111111".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(1, 10) }
67
+ its(:gross_income) { should be == "11111.1111111111111".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1111.1111111111111".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(139, 641) }
76
+ its(:gross_income) { should be == "127690.625".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "27690.625".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(74, 187) }
85
+ its(:gross_income) { should be == "165487589.817880794".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "65487589.817880794".to_d }
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ describe IncomeTax::Countries::UnitedStatesMinorOutlyingIslands do
2
+ subject(:result) { described_class.new(income: income, income_type: type) }
3
+ let(:type) { :gross }
4
+
5
+ describe "from gross income of 0" do
6
+ let(:income) { 0 }
7
+ its(:rate) { should be == Rational(0, 1) }
8
+ its(:gross_income) { should be == 0 }
9
+ its(:net_income) { should be == 0 }
10
+ its(:taxes) { should be == 0 }
11
+ end
12
+
13
+ describe "from gross income of 1000" do
14
+ let(:income) { 1000 }
15
+ its(:rate) { should be == Rational(1, 10) }
16
+ its(:gross_income) { should be == 1000 }
17
+ its(:net_income) { should be == 900 }
18
+ its(:taxes) { should be == 100 }
19
+ end
20
+
21
+ describe "from gross income of 10000" do
22
+ let(:income) { 10000 }
23
+ its(:rate) { should be == Rational(1, 10) }
24
+ its(:gross_income) { should be == 10000 }
25
+ its(:net_income) { should be == 9000 }
26
+ its(:taxes) { should be == 1000 }
27
+ end
28
+
29
+ describe "from gross income of 100000" do
30
+ let(:income) { 100000 }
31
+ its(:rate) { should be == Rational(63, 316) }
32
+ its(:gross_income) { should be == 100000 }
33
+ its(:net_income) { should be == "80062.75".to_d }
34
+ its(:taxes) { should be == "19937.25".to_d }
35
+ end
36
+
37
+ describe "from gross income of 100000000" do
38
+ let(:income) { 100000000 }
39
+ its(:rate) { should be == Rational(142, 359) }
40
+ its(:gross_income) { should be == 100000000 }
41
+ its(:net_income) { should be == "60445495.75".to_d }
42
+ its(:taxes) { should be == "39554504.25".to_d }
43
+ end
44
+
45
+ describe "from net income of 0" do
46
+ let(:type) { :net }
47
+ let(:income) { 0 }
48
+ its(:rate) { should be == Rational(0, 1) }
49
+ its(:gross_income) { should be == 0 }
50
+ its(:net_income) { should be == 0 }
51
+ its(:taxes) { should be == 0 }
52
+ end
53
+
54
+ describe "from net income of 1000" do
55
+ let(:type) { :net }
56
+ let(:income) { 1000 }
57
+ its(:rate) { should be == Rational(1, 10) }
58
+ its(:gross_income) { should be == "1111.111111111111111".to_d }
59
+ its(:net_income) { should be == 1000 }
60
+ its(:taxes) { should be == "111.111111111111111".to_d }
61
+ end
62
+
63
+ describe "from net income of 10000" do
64
+ let(:type) { :net }
65
+ let(:income) { 10000 }
66
+ its(:rate) { should be == Rational(1, 10) }
67
+ its(:gross_income) { should be == "11111.1111111111111".to_d }
68
+ its(:net_income) { should be == 10000 }
69
+ its(:taxes) { should be == "1111.1111111111111".to_d }
70
+ end
71
+
72
+ describe "from net income of 100000" do
73
+ let(:type) { :net }
74
+ let(:income) { 100000 }
75
+ its(:rate) { should be == Rational(139, 641) }
76
+ its(:gross_income) { should be == "127690.625".to_d }
77
+ its(:net_income) { should be == 100000 }
78
+ its(:taxes) { should be == "27690.625".to_d }
79
+ end
80
+
81
+ describe "from net income of 100000000" do
82
+ let(:type) { :net }
83
+ let(:income) { 100000000 }
84
+ its(:rate) { should be == Rational(74, 187) }
85
+ its(:gross_income) { should be == "165487589.817880794".to_d }
86
+ its(:net_income) { should be == 100000000 }
87
+ its(:taxes) { should be == "65487589.817880794".to_d }
88
+ end
89
+ end