{"id":19136840,"url":"https://github.com/mdub/rspec-longrun","last_synced_at":"2025-05-06T20:13:34.796Z","repository":{"id":5175355,"uuid":"6349118","full_name":"mdub/rspec-longrun","owner":"mdub","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-04T12:15:41.000Z","size":47,"stargazers_count":10,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T03:57:03.121Z","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":"lusis/chef-logstash","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdub.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}},"created_at":"2012-10-23T08:27:41.000Z","updated_at":"2022-03-16T08:38:48.000Z","dependencies_parsed_at":"2022-07-06T06:31:11.220Z","dependency_job_id":null,"html_url":"https://github.com/mdub/rspec-longrun","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Frspec-longrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Frspec-longrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Frspec-longrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Frspec-longrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdub","download_url":"https://codeload.github.com/mdub/rspec-longrun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252761237,"owners_count":21800127,"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":[],"created_at":"2024-11-09T06:35:40.376Z","updated_at":"2025-05-06T20:13:34.777Z","avatar_url":"https://github.com/mdub.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSpec::Longrun\n\n[![Gem Version](https://badge.fury.io/rb/rspec-longrun.png)](http://badge.fury.io/rb/rspec-longrun)\n[![Build Status](https://secure.travis-ci.org/mdub/rspec-longrun.png?branch=master)](http://travis-ci.org/mdub/rspec-longrun)\n\nRSpec is a fine unit-testing framework, but is also handy for acceptance and integration tests.  But the default report formatters make it difficult to track progress of such long-running tests.\n\nThe RSpec::Longrun::Formatter outputs the name of each test as it starts, rather than waiting until it passes or fails.  It also provides a mechanism for reporting on progress of a test while it is still executing.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'rspec-longrun'\n\nIn a Rails project, you can safely limit it to the \"test\" group.\n\n## Usage\n\n### Running tests\n\nSpecify the custom output format when invoking RSpec, as follows:\n\n    rspec -r rspec/longrun -f RSpec::Longrun::Formatter spec ...\n\nThe resulting test output looks something like:\n\n    Example group {\n      First example OK (1.2s)\n      Second example OK (3.4s)\n      Third example PENDING (Not implemented yet) (0.2s)\n    } (5.2s)\n\n(though a little more colourful).\n\n### Tracking progress\n\nInclude RSpec::Longrun::DSL to define the 'step' method, which can be used to group blocks of code within the context of a large test.  For example:\n\n```ruby\ndescribe \"Account management\" do\n\n  include RSpec::Longrun::DSL     # \u003c-- important\n\n  example \"Log in and alter preferences\" do\n\n    step \"Log in\" do\n      ui.go_home\n      ui.authenticate_as \"joe\", \"fnord\"\n    end\n\n    step \"Navigate to preferences page\" do\n      ui.nav.prefs_link.click\n    end\n\n    step \"Change preferences\" do\n      ui.prefs_pane.enter_defaults\n      ui.prefs_pane.save\n    end\n\n  end\n\nend\n```\n\nThe resulting test output looks something like:\n\n    Account management {\n      Log in and alter preferences {\n        Log in (0.5s)\n        Navigate to preferences page (0.2s)\n        Change preferences (5.2s)\n      } OK (7.1s)\n    } OK (7.2s)\n\nwhich gives you some extra context in the event that something fails, or hangs, during the test run.\n\n## Contributing\n\nrspec-longrun is on Github. You know what to do.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdub%2Frspec-longrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdub%2Frspec-longrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdub%2Frspec-longrun/lists"}