{"id":15512839,"url":"https://github.com/hopsoft/pry-test","last_synced_at":"2025-04-28T10:25:21.709Z","repository":{"id":4783197,"uuid":"5935378","full_name":"hopsoft/pry-test","owner":"hopsoft","description":"A small test framework that supports debugging test failures \u0026 errors when they happen","archived":false,"fork":false,"pushed_at":"2020-08-20T22:43:15.000Z","size":216,"stargazers_count":25,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-28T10:25:10.956Z","etag":null,"topics":["pry","ruby","test-framework","testing","testing-framework"],"latest_commit_sha":null,"homepage":"","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/hopsoft.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":"2012-09-24T14:04:03.000Z","updated_at":"2024-02-02T15:40:53.000Z","dependencies_parsed_at":"2022-07-09T15:31:33.876Z","dependency_job_id":null,"html_url":"https://github.com/hopsoft/pry-test","commit_stats":null,"previous_names":["hopsoft/micro_test"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fpry-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fpry-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fpry-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Fpry-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hopsoft","download_url":"https://codeload.github.com/hopsoft/pry-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251293370,"owners_count":21566086,"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":["pry","ruby","test-framework","testing","testing-framework"],"created_at":"2024-10-02T09:53:53.625Z","updated_at":"2025-04-28T10:25:21.652Z","avatar_url":"https://github.com/hopsoft.png","language":"Ruby","readme":"[![Lines of Code](http://img.shields.io/badge/lines_of_code-379-brightgreen.svg?style=flat)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)\n[![Maintainability](https://api.codeclimate.com/v1/badges/139cded3012a4e543287/maintainability)](https://codeclimate.com/github/hopsoft/pry-test/maintainability)\n[![Build Status](http://img.shields.io/travis/hopsoft/pry-test.svg?style=flat)](https://travis-ci.org/hopsoft/pry-test)\n[![Coverage Status](https://img.shields.io/coveralls/hopsoft/pry-test.svg?style=flat)](https://coveralls.io/r/hopsoft/pry-test?branch=master)\n[![Downloads](http://img.shields.io/gem/dt/pry-test.svg?style=flat)](http://rubygems.org/gems/pry-test)\n\n_Formerly known as [MicroTest](https://rubygems.org/gems/micro_test)._\n\n# PryTest\n\n\u003e aka pry-test\n\nA small test framework that supports debugging test failures \u0026 errors when they happen.\n\n## Values\n\n* __Simplicity__ - writing tests should be easy \u0026 devoid of friction\n* __Intelligibility__ - tests should be readable \u0026 unambiguous\n* __Immediacy__ - test failures should be dealt with quickly when they occur\n\n## Benefits\n\n* A simple test API\n* An awesome `fail` `pry` `pass` workflow\n* Optional async test runs\n\n[An important note on debugging test failures with Pry.](https://github.com/hopsoft/pry-test/wiki/Debug-Test-Failures-with-Pry#gemfile-considerations)\n\n## The API\n\nEverything you need to know about PryTest's API is outlined here.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003ePryTest::Test\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eSuperclass for all test classes.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003etest(desc, \u0026block)\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Defines a test method.\n      \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003edesc\u003c/code\u003e - a description of what is being tested\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003e\u0026block\u003c/code\u003e - a block of code which defines the test\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eassert(value)\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Verifies the truthiness of a value.\n      \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003evalue\u003c/code\u003e - the value to assert\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003erefute(value)\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Verifies the falsiness of a value.\n      \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003evalue\u003c/code\u003e - the value to refute\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003ebefore(\u0026block)\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      A callback that runs before each test method.\n      \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003e\u0026block\u003c/code\u003e - the block of code to execute\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eafter(\u0026block)\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      A callback that runs after each test method.\n      \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003e\u0026block\u003c/code\u003e - the block of code to execute\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### A Complete Example\n\nThe entire public interface is used in this basic example.\n\n```ruby\nclass MathTest \u003c PryTest::Test\n\n  before do\n    # runs before each test method\n  end\n\n  after do\n    # runs after each test method\n  end\n\n  test \"basic addition\" do\n    assert 2 + 2 == 4\n  end\n\n  test \"all is right in the world\" do\n    refute 0 \u003e 1\n  end\nend\n```\n\n## Get Started\n\nPryTest ships with a demo so you can try it out easily.\n\n```sh\ngem install pry-test\npry-test --help\npry-test --demo\n```\n\nTry some advanced features.\n\n```sh\npry-test --demo --async\npry-test --demo --disable-pry\n```\n\n## Testing Your Own Projects\n\nPryTest assumes your test directory is located at `PROJECT_ROOT/test`;\nhowever, this isn't a requirement. You can indicate your test directory location.\n\n```sh\npry-test /path/to/test/dir\n```\n\nIf you have multiple versions of PryTest installed,\nit's safest to run your tests with `bundle exec`.\n\n```sh\nbundle exec pry-test /path/to/test/dir\n```\n\nPryTest is small \u0026 unobtrusive.\nIt plays nice with other test frameworks, \u0026 can be introduced to existing projects incrementally.\n\n## Advanced\n\n[See the wiki](https://github.com/hopsoft/pry-test/wiki)\nto troubleshoot or get help with more advanced topics.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopsoft%2Fpry-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhopsoft%2Fpry-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopsoft%2Fpry-test/lists"}