{"id":16405564,"url":"https://github.com/perkss/eggplant","last_synced_at":"2025-03-16T16:31:57.022Z","repository":{"id":62432542,"uuid":"77459018","full_name":"perkss/eggplant","owner":"perkss","description":"A behaviour driven development (BDD) library for Clojure. Simplicity is key.","archived":false,"fork":false,"pushed_at":"2023-08-22T20:16:32.000Z","size":58,"stargazers_count":21,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T11:42:13.698Z","etag":null,"topics":["bdd","bdd-framework","bdd-specs","bdd-style","bdd-tests","bddocs","clojure","data-driven","spec","specification","specification-by-example"],"latest_commit_sha":null,"homepage":"https://perkss.github.io/#/clojure#text-body","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perkss.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":"2016-12-27T13:52:52.000Z","updated_at":"2024-01-13T16:53:26.000Z","dependencies_parsed_at":"2024-10-27T11:01:12.500Z","dependency_job_id":"a5c42ee6-2f1d-4c11-88e5-fea50ba12b1d","html_url":"https://github.com/perkss/eggplant","commit_stats":{"total_commits":78,"total_committers":2,"mean_commits":39.0,"dds":"0.038461538461538436","last_synced_commit":"467466e6e6b1a9da5014afeb158f7e963253302e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Feggplant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Feggplant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Feggplant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Feggplant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perkss","download_url":"https://codeload.github.com/perkss/eggplant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822295,"owners_count":20353500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bdd","bdd-framework","bdd-specs","bdd-style","bdd-tests","bddocs","clojure","data-driven","spec","specification","specification-by-example"],"created_at":"2024-10-11T06:06:27.782Z","updated_at":"2025-03-16T16:31:56.746Z","avatar_url":"https://github.com/perkss.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eggplant \n# Behaviour Driven Development (BDD) Library for Clojure\n\n## Details\n\nEggplant is a behaviour driven development (BDD) library for Clojure. Eggplant's focus is on data driven testing to enable a data driven language such as Clojure to be adequately tested. It will use specifications written in a very simple user friendly language to enforce executable tests that can be automated along with providing living documentation. The power of Clojure maps will be our friend!\n\n[Blog Post on eggplant](https://perkss.github.io/#/clojure#text-body)\n\nEggplant just works, it has simple to read phrases and a BDD style test can be written in under 30 seconds, we do not try and over complicate things.\n\nRuns the same as `clojure.test` so will work in any IDE and with any driver such as `lein test` displaying the same differences between expected and actual.\n\n## Features: \n1. Simplicity: a key feature we do not want to over complicate things.\n2. Keywords: given, when, then, or expect, where form the BDD style of testing.\n3. Data driven: Data driven testing using data tables with the where clause.\n\n## How to use:\nPlease work from the examples below. Basically two forms the give or the expect.\nThen provide the text and the keyword names making sure to use : before for example :a.\nOn the providing of the function under test name please provide namespace unless in core and prefix it with #\nto symbolize a function call standard for Clojure anonymous functions. Then provide the map of data in the :data\nor :where map as appropriate and make sure all keywords provided in the BDD text are mapped appropriately.\n \n## Examples\n\n``` clojure\n[eggplant.core :refer :all]\n\n(defspec multiplying-two-numbers\n  (specification\n   {:given \"a input of :a and :b\"\n    :when  \"we #*\"\n    :then  \"we expect :result\"\n    :data {:a 3 :b 4 :result 12}}))\n\n(defspec change-a-string-to-uppercase\n  (specification\n   {:given \"a input of :a\"\n    :when  \"we #clojure.string/upper-case\"\n    :then  \"we expect :result\"\n    :data {:a \"hello\" :result \"HELLO\"}}))\n\n(defspec finding-the-max-of-two-numbers\n  (specification\n   {:expect \"the #max of :a and :b\"\n    :where  {:a 2 :b 3 :expected 3}}))\n\n```\n## Contribute\n\nAlways looking for contribution so please reach out and take some of the issues or create new ones. Beginner friendly.\n \n## Dependency\n\nAvailable: [![Clojars Project](https://img.shields.io/clojars/v/eggplant.svg)](https://clojars.org/eggplant)\n\n#### Leiningen/Boot\n``` \n    [eggplant \"0.2.0\"]\n```\n#### Gradle  \n```\n    compile \"eggplant:eggplant:0.2.0\"\n```\n#### Maven  \n```\n    \u003cdependency\u003e\n      \u003cgroupId\u003eeggplant\u003c/groupId\u003e\n      \u003cartifactId\u003eeggplant\u003c/artifactId\u003e\n      \u003cversion\u003e0.2.0\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n## Contributors\n\nMany thanks to those who have contributed to Eggplant:\n\n- Stuart Perks @perkss\n- Dan Nicolici @dannicolici\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperkss%2Feggplant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperkss%2Feggplant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperkss%2Feggplant/lists"}