Skip to content

Instantly share code, notes, and snippets.

@kgilpin
Created April 9, 2021 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgilpin/26435c5093f98f6d03a7566ccac3dbe7 to your computer and use it in GitHub Desktop.
Save kgilpin/26435c5093f98f6d03a7566ccac3dbe7 to your computer and use it in GitHub Desktop.
{
"$schema": "https://aka.ms/codetour-schema",
"title": "Install AppMap for RSpec",
"steps": [
{
"file": "spec/spec_helper.rb",
"description": "You'll now install the AppMap RSpec helper.\n\n```ruby\nrequire 'appmap/rspec'\n```\n\nThis line should be placed **before** any other `require` statements.\n",
"line": 2,
"contents": "require 'appmap/rspec'"
},
{
"title": "Run a test",
"description": "Now that you've added `appmap/rspec`, it's time to generate some AppMaps! To do that, you simply run the test with the environment variable `APPMAP=true`.\n\nYou can run one test a a time, or you can run all your tests. To run your entire test suite, run this command:\n\n>> APPMAP=true bundle exec rake spec\n"
},
{
"directory": "tmp/appmap/rspec",
"description": "AppMaps files are stored in the directory `appmap/rspec`. Useful actions you can take in this folder:\n\n* You can open and display any AppMap by clicking on it.\n* You can delete all your AppMaps by removing this directory.\n"
},
{
"title": "Open most recently modified AppMap",
"description": "If you run a single test case with `APPMAP=true`, you can open the AppMap by running the command `AppMap: Open most recently modified AppMap file`.\n\nTry it now. When you close the AppMap window, you'll return to this tour.\n\n[AppMap: Open most recently modified AppMap file](command:appmap.openMostRecentlyModifiedAppMap)"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment