The past few days I’ve started working on some TDD using RSpec. This is the first time I’ve ever used or practiced RSpec and I must say it is pretty cool. In fact, after watching a few videos about TDD (test-driven development) I can’t think of a reason you wouldn’t use it. Personally, I feel it fits my work flow perfectly. Typically, when i’m trying to solve a problem I will write it down in plain English in a way that describes how I think code should work, from there I go ahead and try and write the code. The great thing is I am essentially writing on paper what I would be coding in RSpec. From now on I am planning on implementing this strategy, simple as that.
I did have some issues getting RSpec up and running. I followed the standard.
$ gem install rspec
This worked fine and I continued on to practicing with testfirst.org. I found while working on the first lesson that I would get this strange error:
(in /Users/**/Documents/Ruby/Odin Project/learn_ruby)
:116:inrequire': cannot load such file -- hello (LoadError)
After a bunch of searching on google and stackoverflow, I managed to find the problem, A space in a folder name…wow. I changed my folder to Odin_Project and was off and running.
On a side note, I managed to finish my second week, still going strong. Put in about 21hrs.