{"id":15583799,"url":"https://github.com/vinistock/loupe","last_synced_at":"2025-07-12T01:38:18.630Z","repository":{"id":37984072,"uuid":"345499704","full_name":"vinistock/loupe","owner":"vinistock","description":"A toy Ruby test framework with built in parallelism","archived":false,"fork":false,"pushed_at":"2023-03-06T04:59:43.000Z","size":266,"stargazers_count":67,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-19T18:12:47.526Z","etag":null,"topics":["framework","parallel","ractor","ruby","test"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinistock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":"2021-03-08T01:46:12.000Z","updated_at":"2024-08-20T13:57:20.000Z","dependencies_parsed_at":"2024-12-07T01:44:42.623Z","dependency_job_id":"ee53338a-735e-4539-b0f2-2254b100e77a","html_url":"https://github.com/vinistock/loupe","commit_stats":{"total_commits":99,"total_committers":4,"mean_commits":24.75,"dds":"0.31313131313131315","last_synced_commit":"efd4d3253811c41944f30cf7ec64f5d76b79503f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinistock%2Floupe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinistock%2Floupe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinistock%2Floupe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinistock%2Floupe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinistock","download_url":"https://codeload.github.com/vinistock/loupe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232212861,"owners_count":18489469,"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":["framework","parallel","ractor","ruby","test"],"created_at":"2024-10-02T20:21:17.136Z","updated_at":"2025-01-03T15:21:33.233Z","avatar_url":"https://github.com/vinistock.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/18742907/131183084-82c617d9-b83d-49cd-84f3-447ebb90ca50.png\" alt=\"loupe\" height=\"200px\"\u003e\n\u003c/div\u003e\n\n# Loupe\n\nLoupe is the toy test framework used in the talk [Parallel testing with Ractors: putting CPUs to work](https://www.youtube.com/watch?v=bvFj6_dulSo).\n\n## Installation\n\nAdd the gem to the `Gemfile`.\n\n```ruby\ngem \"loupe\"\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nInstall bundler binstubs in your application.\n\n```shell\nbundle binstub loupe\n```\n\n## Usage\n\nCurrently, Loupe only supports writing tests using the test methods syntax. Tests must inherit from `Loupe::Test`, but do not need to explicitly require `test_helper`, like the example below.\n\n```ruby\n# frozen_string_literal: true\n\nclass MyTest \u003c Loupe::Test\n  def before\n    @author = Author.create(name: \"John\")\n    @post = Post.create(author: @author)\n  end\n\n  def after\n    @author.destroy\n    @post.destroy\n  end\n\n  def test_post_is_linked_to_author\n    expect(@post.author.name).to_be_equal_to(\"John\")\n  end\nend\n```\n\nTo run the test suite, invoke the executable using the binstub generated by bundler.\n\n```shell\nbin/loupe test/post_test.rb test/author_test.rb\n```\n\nTests can run in parallel using Ractor or process mode. When using Ractors, the application's code must be Ractor compatible.\n\n```shell\nbin/loupe --ractor            # [default] run tests using Ractor workers\nbin/loupe --process           # run tests using forked processes\nbin/loupe --interactive       # [default] use an interactive reporter to display test results\nbin/loupe --plain             # use a plain reporter to display test results\nbin/loupe --color, --no-color # enable/disable output colors\nbin/loupe --editor=EDITOR     # which editor to use for opening files when using interactive mode. The default is the environment variable $EDITOR\n```\n\nTo hook Loupe into Rake, use the provided rake task as in the example below.\n\n```ruby\n# Rakefile\n\nrequire \"loupe/rake_task\"\n\n# Instantiate the task and append any desired CLI options\nLoupe::RakeTask.new do |options|\n  options \u003c\u003c \"--plain\"\nend\n\n# Optionally, set the default task to be test\ntask default: :test\n```\n\nThen run\n\n```shell\nbundle exec rake test\n```\n\n## Credits\n\nThis project draws a lot of inspiration from other Ruby test frameworks, namely\n\n- [Minitest](https://github.com/seattlerb/minitest)\n- [rspec](https://github.com/rspec/rspec)\n\n## Contributing\n\nPlease refer to the guidelines in [contributing](https://github.com/vinistock/loupe/blob/master/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinistock%2Floupe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinistock%2Floupe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinistock%2Floupe/lists"}