Fix #1865 by memoizing generated method name. (#1872)
Fix #1865 by memoizing generated method name. (#1872)

The problem here is that rails calls `#method_name` on the example a
number of times in order to correctly generate the screenshot and then
manipulate it. Given that we were randomising the integer that was
generated on every call, this didn't work.

This patch solves the problem by memoizing the generated method name so
that the screenshot path is generated once per example and then
correctly accessed on subsequent method calls.
rspec/rspec-rails,rspec/rspec-rails,rspec/rspec-rails