Skip to content

Incorrect use of ranges in mspec #1916

Closed
tonysidaway opened this Issue Sep 19, 2012 · 2 comments

2 participants

@tonysidaway

To take an example from spec/ruby/library/ftools/catname_spec.rb:

ruby_version_is ""..."1.9" do

The tests are executed if RUBY_VERSION is "1.8.7", but not executed if RUBY_VERSION is "1.9.3".

Presumably the intention is for the tests to be executed.

$ bin/mspec -t bin/rbx spec/ruby/library/ftools -T -X18|more
rubinius 2.0.0dev (1.8.7 7d7f5501 yyyy-mm-dd JI) [i386-unknown-openbsd5.2]
...........

Finished in 3.965691 seconds

9 files, 11 examples, 29 expectations, 0 failures, 0 errors

$ bin/mspec -t bin/rbx spec/ruby/library/ftools -T -X19|more
rubinius 2.0.0dev (1.9.3 7d7f5501 yyyy-mm-dd JI) [i386-unknown-openbsd5.2]

Finished in 0.026513 seconds

9 files, 0 examples, 0 expectations, 0 failures, 0 errors
$

@dbussink
Rubinius member

That is exactly how this matcher is intended. The triple dot (...) indicates a range with a non inclusive end, so it will not run on any 1.9.x version.

@dbussink dbussink closed this Sep 19, 2012
@tonysidaway

Thanks. I just checked the documentation and realised that ftools is not in 1.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.