Skip to content

csci-qa/calculator-rspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator kata

Week One

Test drive the development of a Calculator module based on the acceptance criteria below. Submit a pull request (titled "Ready: TDD calculator kata") against your branch to turn in your assignment.

Grading

  1. Does the code run?
  2. Do the tests pass?
  3. Do the tests implemented in the classroom still work?
  4. Did you use the correct file structure specified for rspec?
  5. Did you use proper Ruby naming conventions?
  6. Do your unit tests have assertions?
  7. Did you use good variable naming (i.e. avoid use of single letter variables)

Week Two

Write acceptance tests for your calculator application using the same acceptance criteria. Submit a pull request (titled "Ready: Cucumber kata") against your branch to turn in your assignment.

Acceptance criteria

Subtraction

  • should return an integer
  • the order of operation should matter (not commutative)
  • subtracting zero should return the first integer
  • subtacting an integer from itself should return zero
  • should accept more than 2 numbers at a time

Multiplication

  • should return an integer
  • the order of operation should not matter (commutative)
  • multiplying an integer by one should return the first integer
  • multiplying an integer by zero should return zero
  • should accept more than 2 numbers at a time

Division

  • should return an integer
  • the order of operation should matter (not commutative)
  • dividing an integer by one should return the first integer
  • dividing zero by an integer should return zero
  • dividing an integer by zero should raise an error
  • should accept more than 2 numbers at a time

Git

To complete this assignment, you need to:

  1. Fork this repository
  2. Clone your fork onto your machine with git clone https://github.com/YOUR_USERNAME/calculator
  3. Write code
  4. Push your work to your forked repository with git push
  5. Submit a pull request WITH YOUR NAME IN THE TITLE

Questions or Concerns

Leave us a GitHub issue, email an instructor, or grab one before/after the next class.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages