Logic: http://osherove.com/tdd-kata-1/
Rules: http://slocums.homestead.com/gamescore.html
Rules: http://www.novaroma.org/via_romana/numbers.html
- Clone repository from github:
git clone [email protected]:byapparov/tdd.git
-
Open project in Rstudio
-
Install testthat and devtools packages in Rstudio:
install.packages(c('testthat', 'devtools'))
# choose yes in all prompts
- Run tests
- Via Rstudio console:
devtools::test()
- Via Build -> More -> Test Package (shortcut:
โงโT
)
Explore functions available in testthat
package to check your code:
?expect_equal
?expect_gte
?expect_true
?expect_message