We don't support the ability to pause a spec and allow another one to proceed, then later resume the spec. It goes against some of the main principles that guided the design of RSpec such as test independence and isolation.
Sorry :(. Myron On Wed, Jul 20, 2016 at 4:57 AM, Aravindh Sridharan <[email protected]> wrote: > Hi, I am currently having a issue with respect to execution order of tests > in our rspec suite. Our application is big data pipeline where the front > facing server (collector) accepts requests and sends the data to other > components for transformation. So the collector responds with 202 status > rather than 200. After few seconds the data is available for querying. The > Querying server (QueryAPI) responds to certain queries on the data. In > order to test this, I have to put data into collector, wait for sometime > and query the QueryAPI and assert the result. I didnt want to repeat this > process for every test as sleeping for every test is time consuming. So > currently the tests are like put all the data required to the collector in > before block and at the end of before block, wait for sometime and then the > "it" block will call QueryAPI and assert. This seems ugly as it is > difficult for me to map the test data with the test. Is there a way to > create two custom blocks viz. ingest" bock & "query" block inside "it" > block and then run all ingest blocks together, wait for sometime and run > query blocks. This will help in readability of the tests. Below is an > example of what i want > > > > describe "Test" do > it "Test 1" do > ingest "collector" do > #input data here > end > query "queryapi" do > assert result here > end > end > it "Test 2" do > ingest "collector" do > #input data here > end > query "queryapi" do > assert result here > end > end > end > > The ingest blocks of two tests should run first, wait for sometime and > then run the query blocks. Is this possible? > > -- > You received this message because you are subscribed to the Google Groups > "rspec" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rspec/e9891215-7c49-4b73-9de4-24979e3058f3%40googlegroups.com > <https://groups.google.com/d/msgid/rspec/e9891215-7c49-4b73-9de4-24979e3058f3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CADUxQmteRrAFJGSt4UcN3V-UpsFz8ZkNiy-AV5Uj1v39r8nQxw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
