summaryrefslogtreecommitdiff
path: root/spec/ruby/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/spec_helper.rb')
-rw-r--r--spec/ruby/spec_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/ruby/spec_helper.rb b/spec/ruby/spec_helper.rb
index e7873ce594..c38965d3c5 100644
--- a/spec/ruby/spec_helper.rb
+++ b/spec/ruby/spec_helper.rb
@@ -16,11 +16,14 @@ end
# Running directly with ruby some_spec.rb
unless ENV['MSPEC_RUNNER']
+ mspec_lib = File.expand_path("../../mspec/lib", __FILE__)
+ $LOAD_PATH << mspec_lib if File.directory?(mspec_lib)
+
begin
require 'mspec'
require 'mspec/commands/mspec-run'
rescue LoadError
- puts "Please add -Ipath/to/mspec/lib or install the MSpec gem to run the specs."
+ puts "Please add -Ipath/to/mspec/lib or clone mspec as a sibling to run the specs."
exit 1
end