Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix spec in which order of loading was different in travis server

  • Loading branch information...
commit 4a085046942d506adc5bcda65753774af877f645 1 parent e365d74
@MarcelloDuarte MarcelloDuarte authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 spec/Loader/DirectoryLoaderSpec.php
View
18 spec/Loader/DirectoryLoaderSpec.php
@@ -11,13 +11,13 @@ function itLoadsAllExampleGroupsUnderADirectory()
{
$loader = new DirectoryLoader;
$examples = $loader->load(__DIR__ . '/_files/Bar');
-
- $examples = new SpecIterator($examples);
-
- $i = array('A', 'B', 'C');
- $examples -> withEach ( function ($example) use (&$i) {
- $example->should->beAnInstanceOf('Describe' . current($i));
- next($i);
- });
+ $this->spec(count($examples))->should->be(3);
+
+ foreach ($examples as $example) {
+ $class = get_class($example);
+ if (!in_array($class, array('DescribeA', 'DescribeB', 'DescribeC'))) {
+ $this->fail("$class is not meant to be loaded");
+ }
+ }
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.