getappmap / appmap-ruby

AppMap client agent for Ruby
https://appland.org
Other
100 stars 13 forks source link

fix: Fix bug with rswag's `run_test!` #311

Closed symwell closed 1 year ago

symwell commented 1 year ago

When running rswag tests, pass the RSpec::Core::Example object to rswag's run_test!.

RSpec::Core::Example wasn't being passed. AppMap wasn't crashing so far because example wasn't being used with with RSPEC_VERSION < 3. When used with rspec version 3+ this bug started to occur.

Added testcase spec/fixtures/rails6_users_app/spec/requests/rswag_spec.rb and adjusted existing testcases to account for it.

After this change, verified Forem's ./spec/requests/api/v1 tests all pass without the exclusion pattern used before for ./spec/requests/api/v1/docs/*_spec.rb forem_api_v1_tests_pass_with_appmap

Fixes https://github.com/getappmap/appmap-ruby/issues/309

kgilpin commented 1 year ago

:tada: This PR is included in version 0.95.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: