Skip to content

2KAbhishek/prime-factors-tdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License People Stars Forks Watches Last Updated

Learn TDD with Prime Factors 🧪❌

What is this

prime-factors-tdd is solution for the Prime Factors Kata.

Inspiration

This was inspired by Robert Martin's Three Laws of TDD talk. He gives the demo in Kotlin, but I wanted to try it in Ruby.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of ruby and rspec.

Getting prime-factors-tdd

To install prime-factors-tdd, follow these steps:

git clone https://github.com/2kabhishek/prime-factors-tdd
cd prime-factors-tdd

Using prime-factors-tdd

To run the tests: rspec spec/prime_factors_spec.rb To edit the code: $EDITOR prime_factors.rb

How it was built

prime-factors-tdd was built using ruby

Challenges faced

Setting up rspec withhout rails and bundler was somewhat tricky. rspec --init did the work. Also require_relative was very handy for importing the source code.

What I learned

While building prime-factors-tdd I learned about:

  • Setting up rspec without rails and bundler.
  • Using require_relative to import the source code.
  • Some ruby best practices.
  • How good TDD is.

What's next

Planning to do more katas like this.

Hit the ⭐ button if you found this useful.

More Info

About

Learn TDD with Prime Factors 🧪❌

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages