function it_throws_an_exception_when_spec_class_not_in_the_base_specs_namespace(Filesystem $fs, SplFileInfo $file)
{
$this->beConstructedWith($fs, 'PhpSpec', 'spec', $this->srcPath, $this->specPath);
$filePath = $this->specPath . $this->convert_to_path('/spec/PhpSpec/Some/ClassSpec.php');
$fs->pathExists($this->specPath . $this->convert_to_path('/spec/PhpSpec/'))->willReturn(true);
$fs->findSpecFilesIn($this->specPath . $this->convert_to_path('/spec/PhpSpec/'))->willReturn(array($file));
$fs->getFileContents($filePath)->willReturn('<?php namespace InvalidSpecNamespace\\PhpSpec; class ServiceContainer {} ?>');
$file->getRealPath()->willReturn($filePath);
$exception = new \RuntimeException('Spec class `InvalidSpecNamespace\\PhpSpec\\ServiceContainer` must be in the base spec namespace `spec\\PhpSpec\\`.');
$this->shouldThrow($exception)->duringFindResources($this->srcPath);
}