summaryrefslogtreecommitdiff
path: root/spec/mspec
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mspec')
-rw-r--r--spec/mspec/.travis.yml13
-rw-r--r--spec/mspec/Gemfile.lock6
-rw-r--r--spec/mspec/README.md2
-rw-r--r--spec/mspec/lib/mspec/matchers/block_caller.rb6
-rw-r--r--spec/mspec/lib/mspec/utils/script.rb4
-rw-r--r--spec/mspec/tool/remove_old_guards.rb2
6 files changed, 21 insertions, 12 deletions
diff --git a/spec/mspec/.travis.yml b/spec/mspec/.travis.yml
index 88a1fa250f..0da5e83da2 100644
--- a/spec/mspec/.travis.yml
+++ b/spec/mspec/.travis.yml
@@ -7,17 +7,22 @@ script:
- bundle exec rspec
matrix:
include:
- - rvm: 2.2.9
- - rvm: 2.3.6
- - rvm: 2.4.3
- - rvm: 2.5.0
+ - rvm: 2.3.7
+ - rvm: 2.4.4
before_install:
# https://github.com/travis-ci/travis-ci/issues/8978
- gem update --system
+ - gem install bundler
+ - rvm: 2.5.1
+ before_install:
+ # https://github.com/travis-ci/travis-ci/issues/8978
+ - gem update --system
+ - gem install bundler
- rvm: ruby-head
before_install:
# https://github.com/travis-ci/travis-ci/issues/8978
- gem update --system
+ - gem install bundler
- jdk: oraclejdk8
install:
- curl -L https://github.com/oracle/truffleruby/releases/download/vm-enterprise-0.28/truffleruby-testing-0.28.tar.gz | tar xz
diff --git a/spec/mspec/Gemfile.lock b/spec/mspec/Gemfile.lock
index d07c04638b..e977989f8c 100644
--- a/spec/mspec/Gemfile.lock
+++ b/spec/mspec/Gemfile.lock
@@ -1,8 +1,8 @@
GEM
remote: https://rubygems.org/
specs:
- diff-lcs (1.2.5)
- rake (10.4.2)
+ diff-lcs (1.3)
+ rake (10.5.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
@@ -21,4 +21,4 @@ DEPENDENCIES
rspec (~> 2.14.1)
BUNDLED WITH
- 1.14.5
+ 1.16.1
diff --git a/spec/mspec/README.md b/spec/mspec/README.md
index 18ca8fcdd3..23986c92e4 100644
--- a/spec/mspec/README.md
+++ b/spec/mspec/README.md
@@ -35,7 +35,7 @@ specs in a manner compatible with multiple Ruby implementations.
## Requirements
-MSpec requires Ruby 2.2 or more recent.
+MSpec requires Ruby 2.3 or more recent.
## Bundler
diff --git a/spec/mspec/lib/mspec/matchers/block_caller.rb b/spec/mspec/lib/mspec/matchers/block_caller.rb
index 017bce3cb7..4149586747 100644
--- a/spec/mspec/lib/mspec/matchers/block_caller.rb
+++ b/spec/mspec/lib/mspec/matchers/block_caller.rb
@@ -10,7 +10,11 @@ class BlockingMatcher
blocking = false
end
- while !started and status = thread.status and status != "sleep"
+ Thread.pass while !started
+
+ # Wait until the Thread status is "sleep" (then it's blocking)
+ # or nil (the Thread finished execution, it did not block)
+ while status = thread.status and status != "sleep"
Thread.pass
end
thread.kill
diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb
index 24cd069bb4..db5a33a91a 100644
--- a/spec/mspec/lib/mspec/utils/script.rb
+++ b/spec/mspec/lib/mspec/utils/script.rb
@@ -39,8 +39,8 @@ class MSpecScript
end
def initialize
- ruby_version_is ""..."2.2" do
- abort "MSpec needs Ruby 2.2 or more recent"
+ ruby_version_is ""..."2.3" do
+ abort "MSpec needs Ruby 2.3 or more recent"
end
config[:formatter] = nil
diff --git a/spec/mspec/tool/remove_old_guards.rb b/spec/mspec/tool/remove_old_guards.rb
index feb4ee4662..8b036d07f5 100644
--- a/spec/mspec/tool/remove_old_guards.rb
+++ b/spec/mspec/tool/remove_old_guards.rb
@@ -36,6 +36,6 @@ def remove_guards(guard, keep)
end
end
-version = (ARGV[0] || "2.2")
+version = (ARGV[0] || "2.3")
remove_guards(/ruby_version_is ["']#{version}["'] do/, true)
remove_guards(/ruby_version_is ["'][0-9.]*["']...["']#{version}["'] do/, false)