I need this. I need to use Spec::Item.description for the name of each test’s snapshot file. Otherwise each test will have 2 copies of the description text.
bad:
it "lists some JSON for user" do
res = process_request req
res.body.should match_snapshot "Http/Posts/List/lists some JSON for user"
end
good:
it "lists some JSON for user" do
res = process_request req
res.body.should match_snapshot "Http/Posts/List/#{self.description}"
end