{"id":24061396,"url":"https://github.com/baqar-abbas/ruby-tdd","last_synced_at":"2026-07-16T03:03:10.773Z","repository":{"id":185963480,"uuid":"674316169","full_name":"baqar-abbas/ruby-TDD","owner":"baqar-abbas","description":"This project demonstrates testing in Ruby using Test Driven Development (TDD) approach using RSPEC as a testing tool.","archived":false,"fork":false,"pushed_at":"2023-08-04T11:16:33.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-10-22T03:34:12.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baqar-abbas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-03T16:37:08.000Z","updated_at":"2023-08-18T07:46:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce3a9ce5-abf6-4e59-a423-b1e80ee29c61","html_url":"https://github.com/baqar-abbas/ruby-TDD","commit_stats":null,"previous_names":["baqar-abbas/ruby-tdd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baqar-abbas/ruby-TDD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baqar-abbas%2Fruby-TDD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baqar-abbas%2Fruby-TDD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baqar-abbas%2Fruby-TDD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baqar-abbas%2Fruby-TDD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baqar-abbas","download_url":"https://codeload.github.com/baqar-abbas/ruby-TDD/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baqar-abbas%2Fruby-TDD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35528483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-09T07:20:07.849Z","updated_at":"2026-07-16T03:03:10.755Z","avatar_url":"https://github.com/baqar-abbas.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\n\u003cimg src=\"logo.png\" alt=\"logo\" width=\"140\"  height=\"auto\" /\u003e\n\n  \u003ch1\u003e\u003cb\u003eTDD with Ruby\u003c/b\u003e\u003c/h3\u003e\n\n  \u003cp\u003e Created three unit tests using Rspec with mocks with the goal of practice and fully understand TDD concept\u003c/p\u003e\n\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\n# 📗 Table of Contents\n\n- [📖 About the Project](#about-project)\n  - [🛠 Built With](#built-with)\n    - [Tech Stack](#tech-stack)\n    - [Key Features](#key-features)\n- [💻 Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Setup](#setup)\n  - [Usage](#Usage)\n  - [Tests](#tests)\n- [👥 Authors](#authors)\n- [🔮 Future features](#future-features)\n- [🤝 Contributing](#contributing)\n- [⭐️ Show your support](#support)\n- [🙏 Acknowledgements](#acknowledgements)\n- [📝 License](#license)\n\n\u003c!-- PROJECT DESCRIPTION --\u003e\n\n# 📖 About the project \u003ca name=\"about-project\"\u003e\u003c/a\u003e\n\n\nThis project is done as part of Microverse program as a collaborative Project. We have done test-driven development (TDD), writing tests first and then creating the methods. \n\n\n\n## 🛠 Built With \u003ca name=\"built-with\"\u003e\u003c/a\u003e\n\n### Tech Stack \u003ca name=\"tech-stack\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://www.ruby-lang.org/en/\" target=\"_blank\"\u003e\u003cimg align=\"center\" src=\"https://upload.wikimedia.org/wikipedia/commons/7/73/Ruby_logo.svg\" alt=\"html5\" width=\"60\" height=\"80\"/\u003e\u003c/a\u003e\n\n\u003c!-- Features --\u003e\n\n### Key Features \u003ca name=\"key-features\"\u003e\u003c/a\u003e\n1. First we have created the test for every method:\n\n- Create a method called `factorial` that takes one argument, an integer `N`, and returns the [factorial](https://en.wikipedia.org/wiki/Factorial) for that number. The factorial is the multiplication of all integers from 1 to `N` and has the special case that the factorial of 0 is 1. This method only accepts 0 and positive integers, so if a negative integer is given it should raise an exception.\n- Create a method called `reverse` that takes one argument, a string `word`, and returns `word` reversed (e.g. if `word` is `\"hello\"` it returns `\"olleh\"`).\n- Create a method called `fizzbuzz` that takes one argument, an integer `N`, and returns a string. The returned string is constructed following these rules:\n  - When `N` is divisible by 3, return `\"fizz\"`.\n  - When `N` is divisible by 5, return `\"buzz\"`.\n  - When `N` is divisible by 3 and 5, return `\"fizzbuzz\"`.\n  - Any other case, return `N` as a string (e.g. say `N` is `7` then return `\"7\"`).\n- Remember to start with tests for all of the methods described above. Your commit history should prove that you have used TDD.\n\n2. Second we have created the class Solver with the mentioned methods.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n\n## 💻 Getting Started \u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n\n\nTo get a local copy up and running, follow these steps.\n\n### Prerequisites\n\nIn order to run this project you need:\nInstall ruby. To install ruby in your machine you can follow the steps listed in the [Ruby installation instructions guide](https://github.com/microverseinc/curriculum-ruby/blob/main/simple-ruby/articles/ruby_installation_instructions.md)\n\n### Setup\n\nClone this repository to your desired folder:\n```\n  cd ruby-TDD\n  git clone git@github.com:myaccount/my-project.git\n```\n\n### Usage\n\nTo start the app, run the command:\n\n```\n  ruby main.rb\n```\n\n### Tests\n\nTo start the app, run the command:\n\n```\n  rspec spec\n```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- AUTHORS --\u003e\n\n## 👥 Authors \u003ca name=\"authors\"\u003e\u003c/a\u003e\n\n👤 **Andrea Rivas**\n\n- GitHub: [@rivasbolinga](https://github.com/rivasbolinga)\n- LinkedIn: [Andrea Rivas](https://www.linkedin.com/in/andrearivaspalacios/)\n\n👤 **Baqar Abbas**\n\n- GitHub: [@Baqar](https://github.com/baqar-abbas)\n- Twitter: [@BaqarAbbas9](https://twitter.com/BaqarAbbas9)\n- LinkedIn: [Baqar Abbas](https://www.linkedin.com/in/baqar-abbas/)\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- FUTURE FEATURES --\u003e\n\n## 🔮 Future Features \u003ca name=\"future-features\"\u003e\u003c/a\u003e\n\n- Create more methods.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## 🤝 Contributing \u003ca name=\"contributing\"\u003e\u003c/a\u003e\n\nContributions, issues, and feature requests are welcome!\n\nFeel free to check the [issues page](../../issues/).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- SUPPORT --\u003e\n\n## ⭐️ Show your support \u003ca name=\"support\"\u003e\u003c/a\u003e\n\nIf you like this project give it a star 🌟🌟🌟\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n\n## 🙏 Acknowledgments \u003ca name=\"acknowledgements\"\u003e\u003c/a\u003e\n\n\nI would like to thank **![Microverse](https://img.shields.io/badge/Microverse-blueviolet)** and my partner [Andrea](https://github.com/rivasbolinga?tab=repositories) for his participation in this project. \n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- LICENSE --\u003e\n\n## 📝 License \u003ca name=\"license\"\u003e\u003c/a\u003e\n\nThis project is [MIT](https://github.com/baqar-abbas/ruby-TDD/blob/dev/LICENSE) licensed.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaqar-abbas%2Fruby-tdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaqar-abbas%2Fruby-tdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaqar-abbas%2Fruby-tdd/lists"}