learn-co-curriculum / sinatra-mvc-file-structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail if first defined test does not run first

mhav opened this issue · comments

The defined tests fail if the first defined test (it 'can create a dog with attributes on initialization') does not run first. If other tests run before this one there are leftover dogs in the DOGS array.
The easiest way to avoid the problem is to add the following line to the .rspec file:
--order defined

This makes sure the tests run in the order they have been defined in the spec and that the test suite passes (when the task has been solved correctly).

Hi there,

Thank you for bringing this to our attention. The default should be to execute the test in the order in which they are defined. Are they executing in a different order?

As always thank you for contributing.

Closed with order defined added understanding now follow up from student to Jason's request.