You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a blank repo for general build, test, and patch discussions re Ruby on Windows.
There's patch (see #1) that allows windows ruby to use fractional seconds for file times. There are several spec tests that have platform_is :linux do because of this issue. Obviously, one can allow windows test by using platform_is :linux, :windows do, but that isn't restricting the version.
So, I'd like the test to run if the platform is :linux or it's :windows and the version >= 2.5.0.
In what manner would you prefer to constrain a test for that type of criteria?
Thanks.
The text was updated successfully, but these errors were encountered:
There is unfortunately no easy way to do this currently.
It is however easier if we only need to test this extra feature on platforms supporting it (not asserting that it does not work on the other platforms, which I think is not so useful in this case).
The best way currently is to use shared specs:
describe:file_mtime_us,shared: truedoit"returns the modification Time of the file with microseconds"do
...
endendplatform_is:linuxdoit_should_behave_like:file_mtime_usendplatform_is:windowsdoruby_version_is"2.5"doit_should_behave_like:file_mtime_usendend
Going forward I would like to improve this as described in ruby/mspec#30.
@eregon
I created a blank repo for general build, test, and patch discussions re Ruby on Windows.
There's patch (see #1) that allows windows ruby to use fractional seconds for file times. There are several spec tests that have
platform_is :linux do
because of this issue. Obviously, one can allow windows test by usingplatform_is :linux, :windows do
, but that isn't restricting the version.So, I'd like the test to run if the platform is :linux or it's :windows and the version >= 2.5.0.
In what manner would you prefer to constrain a test for that type of criteria?
Thanks.
The text was updated successfully, but these errors were encountered: