This is a challenge set at the end of week 11 at Rambutan Academy.
Here we're going to revisit the basics of Ruby. There are 50 questions - you have to do every single one, complete all of it. They vary in level from quite easy to fairly hard. Work through them and check if they're correct by running the specs.
You should be able to answer most questions with a couple of lines of code, and just a few methods. If you're writing a long, complex solution, there's probably a better way.
To run the specs, just run
$ rspec questions_spec.rb
To run a specific test, then run
$ rspec questions_spec.rb -e 'specific test'
- Try and get the RSpec tests to pass (but not by cheating - i.e. hardcoding the expected value)
- You shouldn't need any extra libraries or gems
- The cleaner your code the better!
- Googling is fine as usual