jejacks0n / teaspoon

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

`url.shellescape` breaks PhantomJS driver #271

Closed nalbion closed 9 years ago

nalbion commented 10 years ago

As per this StackOverflow post I'm getting the following error when I run teaspoon:

Teaspoon::UnknownSuite: Unknown suite "default\"

I've managed to track the problem down to lib/teaspoon/drivers/phantomjs_driver.rb in driver_options(url). For some reason (perhaps to URL-encode the suite name?) you call url.shellescape which changes the URL from

http://127.0.0.1:62848/teaspoon/default?reporter=Console

to

http://127.0.0.1:62848/teaspoon/default\?reporter\=Console

If I remove the call to .shellescape everything seems to behave.

nalbion commented 10 years ago

It seems that this issue has been fixed in https://github.com/modeset/teaspoon/commit/0c5dd7fbf76cb29ff4616c27ae731cdd6c301bb3, but not yet released.

jejacks0n commented 10 years ago

yeah, I believe that was a PR for a windows fix, but it broke things elsewhere. I think we'll release teaspoon in the next month or so. Sorry about that.

jejacks0n commented 9 years ago

I believe I've resolved this.. I am not using shellescape anymore however, just wrap things in quotes.