Hi,
as the subject line say I’d like to use returned results from one testcase in another test case
here is a simple use case: assume you have a test case that look like:
> describe command(“dig +short 8.8.8.8”) do
> its(“stdout”) { should cmp ‘*.’}
> end
The dig command returns a IP address. I would like to take the returned IP addres and use it in the succeeding test(s) for a simple example
> describe command("ping ") do
> its(“stdout”) { should cmp ‘’}
> end
Yes that code will not work, I know that. Its only to explain a use case. What I really what to know is something like this possible? If so can you provide a commented example? If not, could I do something like this using custom resources? if so can you provide an example?
Thanks.