Open pf-bajorek opened 8 years ago
@pf-bajorek Thanks - the build is failing though because of the changed where/which line for the windows tests. Could you fix that test please?
@colszowka Hi! I checked travis and failed examples is:
rspec ./spec/platform_spec.rb:176 # Phantomjs::Platform on Windows with system install returns the correct phantom js executable path for the platform
The error encourage because it is executed on linux machine:
Called from /home/travis/build/colszowka/phantomjs-gem/spec/platform_spec.rb
I don't know whether trevis can run tests on windows?
What do you do to fix this test? Skip it on unix machines?
The test suite is built to simulate the corresponding platforms by stubbing out the respective root calls, see the setup block of the failing test in https://github.com/colszowka/phantomjs-gem/blob/master/spec/platform_spec.rb#L177 :)
@colszowka done :)
So, will it be merged?
ping
@colszowka Are you planing to merge this issue to master and push new gem version?
I would suggest 2 additional changes.
To account for more windows setups (mine identifies as mswin32):
def useable?
host_os =~ /mingw|mswin|cygwin/
end
To account for multiple phantomjs.exe on path:
def system_phantomjs_path
`where phantomjs`.split("\n")[0]
rescue
end
``
where
instead ofwhich