anita00001 / tdd-solver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test-Driven-Development

πŸ“— Table of Contents

πŸ“– Test-Driven-Development

Test Driven Development is a software development approach that emphasizes writing tests for a piece of code before actually implementing that code. The primary goal of TDD is to ensure that software functions correctly and meets the desired requirements by following a structured and iterative process.
Steps:

  • Write a Test: Before writing any code, the developer writes a test case that defines the expected behavior of a specific piece of functionality. This test is usually written in a testing framework specific to the programming language being used.
  • Run the Test: Initially, the test will fail since the code to be tested doesn't exist yet, or it doesn't implement the desired functionality.
  • Write the Code: The developer then proceeds to write the minimum amount of code necessary to make the test pass. This code should fulfill the requirements outlined in the test case.
  • Run the Test Again: After writing the code, the developer runs the test again. If the test now passes, it means that the code meets the specified requirements and hasn't introduced any regressions.
  • Refactor (if necessary): If the code passes the test but could be improved in terms of readability, efficiency, or maintainability, the developer can refactor it while keeping the test in a passing state. This ensures that any changes don't break the existing functionality.

πŸ›  Built With

This project is built with Ruby.

Ruby

Key Features

  • Followed TDD approach
  • Method to solve factorial of a number
  • Method to reverse a string
  • Method to return strings ("FizzBuzz", "Fizz", "Buzz")

(back to top)

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

  • Download and Install Ruby for your OS.

Setup

Clone this repository to your desired folder:

  git clone https://github.com/anita00001/tdd-solver.git
cd tdd-solver

Install

Install this project with:

  gem install
  bundle install

Usage

To run the project, execute the following command:

  ruby filename.rb

Run tests

To run the tests, execute the following command:

  gem install rspec
  rspec

(back to top)

πŸ‘₯ Authors

πŸ‘€ Anita Sharma


πŸ‘€ Muhammad Amran Khan (Mike)

(back to top)

πŸ”­ Future Features

  • Add design for User Interface
  • Add more test cases
  • Add more methods on class Solver

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project, you can appreciate us by giving star ⭐

(back to top)

πŸ™ Acknowledgments

We are grateful to provide the opportunity to collaborate on this project. It has helped us to empower our knowledge on Ruby together and hence growing us as a skilled Software developer.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)

About


Languages

Language:Ruby 100.0%