Giter VIP home page Giter VIP logo

moredrillswithrspec's Introduction

#More Drills!

Let's continue to test our knowledge of Ruby by solving a few puzzles. This time instead of using prints to test our functions, we'll use RSpec. Remember to run bundle after you clone down this repository. Bundler will gather the dependencies needed for you to use RSpec.

Enjoy!

##Super Fizz Buzz Instructions Clone the repository, navigate to the project directory and run rspec spec/fizzbuzz_spec.rb. If you're using RubyMine, you may have to complete different steps to run the tests. When you run the tests, they should initially fail. Your goal is to make the tests pass by modifying the run method in the lib/fizz_buzz.rb file. It should accept a number and return the following:

  • Return "Fizz" if the number is divisible by 3
  • Return "Buzz" if the number is divisible by 5
  • Return "FizzBuzz" if the number is divisible by 3 & 5

I have only wrote tests to check for "Fizz". This challenge will be complete once you implement the method and tests for "Buzz" & "FizzBuzz".

##Deaf Grandma Modify the ask_grandma method in lib/deaf_grandma.rb to return the following:

  • If you "speak" to grandma softly, she responds "SPEAK UP SONNY!"
  • If you "YELL" at grandma, she should respond "NOT SINCE 1964!"
  • If you yell "BYE" three times, she eventually responds "SEE YOU LATER SONNY!" and the game ends

You run it's accompanying tests with rspec spec/deaf_grandma_spec.rb. The object of this challenge is get everything working and have all tests pass.

moredrillswithrspec's People

Contributors

degoeym avatar nickmccurdy avatar jaybobo avatar jkcable avatar

Watchers

James Cloos avatar Bobby McDonald avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.