jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Default suite runs configuration (including hooks) twice #184

Closed joefiorini closed 10 years ago

joefiorini commented 10 years ago

I noticed on 0.7.9 that my hooks are running twice even though they're only called once. I was able to trace it down to this code (still there in master). It looks like it's running the block for default and then yielding to the block handed in, which according to the calling method is the same block that was just run. I was able to fix it by passing the suite name to the initializer and stopping the block from running if it's "default".

If this was fixed in the hooks refactoring, please feel free to close. Just bringing to your attention just in case you weren't aware.

jejacks0n commented 10 years ago

Thanks! And I bet that's still a problem. I'll check it when I get some time.


Jeremy Jackson

On Feb 23, 2014, at 2:55 PM, Joe Fiorini notifications@github.com wrote:

I noticed on 0.7.9 that my hooks are running twice even though they're only called once. I was able to trace it down to this code (still there in master). It looks like it's running the block for default and then yielding to the block handed in, which according to the calling method is the same block that was just run. I was able to fix it by passing the suite name to the initializer and stopping the block from running if it's "default".

If this was fixed in the hooks refactoring, please feel free to close. Just bringing to your attention just in case you weren't aware.

— Reply to this email directly or view it on GitHub.

nathanpalmer commented 10 years ago

I'm noticing the same thing. Updated to rev 1d6c9b7b94213379ffb32e18c08f2906ec60392c from 3ad92a26680e94b32d2d879dec9134609442d3fb and it seems the same.

screenshot 2014-06-25 14 57 10