adding the capture method (environment) to data cash
added unit test for capturemethod
improved testing found an issue in my original solution
Merge pull request #956 from Shopify/data_cash_environment

adding the capture method (environment) to data cash