Minitest :: How. What? Who. How?

I am Sadly. Pathetically. Sort of. Testing. 

Right now I'm using Minitest to test my ruby projects. I'm really getting bogged down in not knowing the assertion commands. So I can test if things are equal. And that's about it.

My solution is to try and create a decent flashcard set

Here are the flashcards

I pulled a lot of the examples from Matt Sears Blog and of course, the documentation.

I am also trying to 'TDD' a silly game for ex45 of Learning Ruby the Hard Way

Here is a link to the github repository as I work

Unfortunately, I've made two major errors so far

1. I started pushing to the master branch instead of breaking off into work branches. Currently my little project doesn't work. 

2. I didn't do enough research on how to test puts statements - so making my game functional makes all the tests fail

---- 

So next steps? 

  1. I'm going to read over the examples in the Matt Sears blog again and try to understand exactly what he's testing.
  2. Read over the documentation and compare it to what I have in the flashcards to make sure I'm understanding things correctly.
  3. Go back to my little project and attempt to get all broken tests working.

--- 

Concerns

  1. I'm mainly concerned that minitest won't be a tool that I use very often after this. I should probably read more tutorials and screen casts to get a better idea of its ultimate use, and if I should switch focusing on RSPEC instead.

My Workflow: Exercise 37 in Learn Ruby the Hard Way

Links:

Learn Ruby the Hard Way Exercise 37 - List of ruby symbols and keywords to become familiar with at this point in the process - Originally pointed to the tutorial by the learn.thoughtbot.com Trailmaps

 * TestHead Blog Exercise 37 - I blog I found via google-fu by a writer who charted out his progress through all the Ruby the Hard Way exercises - use it to cross check my work after I finish an exercise and to cross check my sanity and ego (because he's way better at this)

* Ruby Documentation - I have this tabbed in order to look up the definitions of the words - but obviously it is very dry

* The Well-Grounded Rubyist - Sitting beside my laptop is my ipad, with this book up - after I read the dry definition - I cross check the Well Grounded book, as his explanations are easier for me to parse

* IRB (for obvious reasons, not a link) - After reading, I try out the keyword, symbol or etc

* Quizlet Flashcards - Shout out to classmate Nathaniel Watts for sending out classmate profile study cards made on this website and introducing me to it! I put the definition as I now define it into a study set to study later

* turntable.fm (chill or be chilled room) - Light musical accompaniment without any lyrics

* TomatoTimer - TRYING to work with the Pomodoro system to stay on track

If all those methods failed - I googled 'how is __blank__ use in ruby' and if I didn't understand the result, I added the link and flagged it for future understanding

Here is the direct link to the flashcards - definitely not perfect yet!


List of all the Keywords, Symbols etc from Exercise 37

Keywords

  • alias
  • and
  • BEGIN
  • begin
  • break
  • case
  • class
  • def
  • defined?
  • do
  • else
  • elsif
  • END
  • end
  • ensure
  • false
  • for
  • if
  • in
  • module
  • next
  • nil
  • not
  • or
  • redo
  • rescue
  • retry
  • return
  • self
  • super
  • then
  • true
  • undef - When is it used?
  • unless
  • until
  • when
  • while
  • yield - When is it used?

Data Types

For data types, write out what makes up each one. For example, with strings write out how you create a string. For numbers write out a few numbers.

  • true
  • false
  • nil
  • constants
  • strings
  • numbers
  • ranges
  • arrays
  • hashes

String Escapes Sequences For string escape sequences, use them in strings to make sure they do what you think they do.

  • \\
  • \'
  • \"
  • \a
  • \b
  • \f
  • \n
  • \r
  • \t
  • \v

Operators Some of these may be unfamiliar to you, but look them up anyway. Find out what they do, and if you still can't figure it out, save it for later.

  • ::
  • []
  • **
  • -(unary)
  • +(unary)
  • !
  • ~
  • *
  • /
  • %
  • +
  • -
  • <<
  • >>
  • &
  • |
  • >
  • >=
  • <
  • <=
  • <=>
  • ==
  • ===
  • !=
  • =~
  • !~
  • &&
  • ||
  • ..
  • ...

 

Source: http://www.squarespace.com/stories/#parts-...