atoum / ruler-extension

The atoum ruler-extension allows you to filter your tests using Hoa\Ruler.
MIT License
9 stars 4 forks source link

--filter is not recognized #13

Closed Hywan closed 9 years ago

Hywan commented 9 years ago

Hello :-),

When I do a --help, I have --filter listed. But when I use --filter, I have the following error:

Error: Argument '--filter' is unknown, did you mean '--files'?

Do you reproduce it? /cc @agallou and @jubianchi.

agallou commented 9 years ago

@Hywan I don't reproduce this.

Here is the files I've used for the test : https://gist.github.com/agallou/67835a4181b077e32220

And i've launched this command :

./vendor/bin/atoum toto_test.php --filter "'test1' in tags"

Do you have more information about how you'ved installed/configured the ruler ?

Hywan commented 9 years ago

Why this: https://github.com/atoum/ruler-extension/blob/master/autoloader.php#L24? It makes impossible to run the tests :-/, because I have this error:

Error: RecursiveDirectoryIterator::__construct(…/Hoa/Iterator/vendor/atoum/ruler-extension/../../hoa/iterator/): failed to open dir: No such file or directory

Why? Because I am testing Hoa\Iterator so hoa/iterator and composer does not hoa/iterator… I don't know if it is expected or not, but I wonder why we should declare Hoa libraries to the autoloader of atoum?

agallou commented 9 years ago

I do too. Why does Hoa librairies are declared in the autoloaded. For me they should be autoloaded via the composer autoloader (when adding something like this in the .atoum.php file require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';. @jubianchi why Hoa had to be added in the autoloader ?

Hywan commented 9 years ago

@agallou We are discussing about that on IRC. It's kind of a unexpected behavior in Composer. But, when fixed, I still have the bug with --filter.

Hywan commented 9 years ago

If --filter is at the end of the option list, it fails. @jubianchi found it.

Hywan commented 9 years ago

/cc @jubianchi as a reminder (as asked on IRC)

jubianchi commented 9 years ago

Will be fixed by atoum/atoum#440