{"id":22725352,"url":"https://github.com/delonnewman/gen-test","last_synced_at":"2025-03-29T23:42:17.542Z","repository":{"id":56873920,"uuid":"197236166","full_name":"delonnewman/gen-test","owner":"delonnewman","description":"Generative or property based testing for Ruby","archived":false,"fork":false,"pushed_at":"2024-03-01T16:52:24.000Z","size":29,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T03:17:56.333Z","etag":null,"topics":["functional-programming","generative-testing","property-based-testing","quickcheck","ruby"],"latest_commit_sha":null,"homepage":"https://www.rubydoc.info/gems/gen-test","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/delonnewman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-16T17:11:10.000Z","updated_at":"2022-05-23T16:25:29.000Z","dependencies_parsed_at":"2022-08-20T10:11:02.163Z","dependency_job_id":null,"html_url":"https://github.com/delonnewman/gen-test","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delonnewman%2Fgen-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delonnewman%2Fgen-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delonnewman%2Fgen-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delonnewman%2Fgen-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delonnewman","download_url":"https://codeload.github.com/delonnewman/gen-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258862,"owners_count":20748573,"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":["functional-programming","generative-testing","property-based-testing","quickcheck","ruby"],"created_at":"2024-12-10T16:09:24.849Z","updated_at":"2025-03-29T23:42:17.512Z","avatar_url":"https://github.com/delonnewman.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Ruby](https://github.com/delonnewman/gen-test/workflows/Ruby/badge.svg)\n[![Gem Version](https://badge.fury.io/rb/gen-test.svg)](https://badge.fury.io/rb/gen-test)\n\nGen::Test\n=========\n\nGenerative, property based testing for Ruby\n\nSynopsis\n========\n    \n```ruby\nAddOne = lambda { |x| x + 1 }\n\nclass AddOneTest \u003c Minitest::Test\n  include Gen::Test\n\n  def test_incremented_for_all_integers\n    for_all Integer do |int|\n      inc = AddOne[int]\n      assert_equal(inc, int + 1)\n    end\n  end\nend\n```\n\nWhy?\n====\n\nGenerative or property based testing is an approach to testing where tests are automatically generated from\ndefinitions for properties of the system being tested. While slower, generative testing has much value for\nunit, acceptance and integration testing over TDD and BDD.\n\nFor example, generative tests still have much value when they're written after your code, and when extensive\ncan be quite useful for integration testing.\n\n[Others](https://www.youtube.com/watch?v=r5i_OiZw6Sw) [argue](http://www.quviq.com/products/quickcheck-for-c/)\nthis point well.\n\nThere seemed to be a need for a simple, extensible, implementation for Ruby, that isn't a DSL or a framework.\nThis module strives to serve that purpose, it's still very incomplete, but it's proven useful.\n\nYou can use Gen::Test along side other tests written in a different style and it's designed to be used with\nother testing frameworks like [Minitest](https://github.com/seattlerb/minitest) and [Rspec](https://rspec.info/).\n\nIt's also extensible, defining a simple protocol for extensiblity. Just define a `generate` method that can\nbe called with no arguments and returns your generated data on any object and it can be used as a generator.\n\nMany core objects have already been extended (see [lib/ext_core.rb](lib/ext_core.rb)). You can also make use\nof `Gen::Generator` which is a Proc-like object that implements the `generate` method.\n\nInstall\n=======\n\n    \u003e gem install gen-test\n\nor, add\n\n    gem 'gen-test'\n\nto your Gemfile.\n\nExtentions\n==========\n\n- [Contracts::Gen](https://github.com/delonnewman/contracts-gen), defines generators for most of\n  contracts the [Contracts](https://github.com/egonSchiele/contracts.ruby) gem.\n\nSee Also\n========\n\n- For Clojure [test.check](https://github.com/clojure/test.check)\n- For Haskell (the original version) [QuickCheck](https://hackage.haskell.org/package/QuickCheck)\n- For Erlang (the most complete version) [QuickCheck](http://www.quviq.com/products/erlang-quickcheck/)\n- There's quite a few different versions for [Ruby](https://rubygems.org/search?utf8=%E2%9C%93\u0026query=quickcheck)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelonnewman%2Fgen-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelonnewman%2Fgen-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelonnewman%2Fgen-test/lists"}