Our suite would sometimes randomly hang when running a certain spec, but we weren't able to tell which one. With the below RSpec around filter you can see the spec that is currently running by inspecting the process name.
$ rspec spec_spec.rb &
[2] 64968
$ ps | grep rspec
64968 ttys005 0:00.24 rspec /Users/miha/spec_spec.rb:10 "Dummy spec waits for 100 seconds"
+1 to this. I needed to autogenerate unique and meaningful VCR cassette names for the current example. In Minitest, getting the example string is as easy as
self.class.to_s + @__name__
, but it looks like Rspec makes you do extra work.We solved this using a global before hook to save the example string to an instance variable which is available throughout the example:
Then we name our VCR cassette after that string: