Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (54 sloc) 2.014 kb
8a25d7e @brixen Require MSpec gem be installed to run the specs with RSpec.
brixen authored
1 unless ENV['MSPEC_RUNNER']
2 begin
15987f7 @arthurschreiber Require pp when running with RSpec.
arthurschreiber authored
3 require "pp"
b2e1a2f @brixen Added version.rb to RubySpec and MSpec-version check.
brixen authored
4 require 'mspec/version'
8a25d7e @brixen Require MSpec gem be installed to run the specs with RSpec.
brixen authored
5 require 'mspec/helpers'
6 require 'mspec/guards'
7 require 'mspec/runner/shared'
8 require 'mspec/matchers/be_ancestor_of'
9 require 'mspec/matchers/output'
10 require 'mspec/matchers/output_to_fd'
11 require 'mspec/matchers/complain'
63dc9eb @brixen Converted shared specs to RSpec-style shared 'describe' blocks.
brixen authored
12 require 'mspec/matchers/equal_element'
13 require 'mspec/matchers/equal_utf16'
14 require 'mspec/matchers/match_yaml'
e160bf9 @brixen Fixes to get Kernel specs running with RSpec again.
brixen authored
15 require 'mspec/matchers/have_class_variable'
16 require 'mspec/matchers/have_constant'
17 require 'mspec/matchers/have_instance_method'
18 require 'mspec/matchers/have_instance_variable'
19 require 'mspec/matchers/have_method'
20 require 'mspec/matchers/have_private_instance_method'
21 require 'mspec/matchers/have_protected_instance_method'
22 require 'mspec/matchers/have_public_instance_method'
6c1c34a @brixen Ask not what RubySpec can do for you, but what you can do for RubySpec.
brixen authored
23
9d34594 @jredville ensuring that ENV[HOME] is defined on windows
jredville authored
24 # Code to setup HOME directory correctly on Windows
25 # This duplicates Ruby 1.9 semantics for defining HOME
26 platform_is :windows do
27 if ENV['HOME']
28 ENV['HOME'] = ENV['HOME'].tr '\\', '/'
29 elsif ENV['HOMEDIR'] && ENV['HOMEDRIVE']
30 ENV['HOME'] = File.join(ENV['HOMEDRIVE'], ENV['HOMEDIR'])
31 elsif ENV['HOMEDIR']
32 ENV['HOME'] = ENV['HOMEDIR']
33 elsif ENV['HOMEDRIVE']
34 ENV['HOME'] = ENV['HOMEDRIVE']
35 elsif ENV['USERPROFILE']
36 ENV['HOME'] = ENV['USERPROFILE']
37 else
21139b2 @brixen Update version to 0.7.0 and require mspec v1.5.5.
brixen authored
38 puts "No suitable HOME environment found. This means that all of"
39 puts "HOME, HOMEDIR, HOMEDRIVE, and USERPROFILE are not set"
9d34594 @jredville ensuring that ENV[HOME] is defined on windows
jredville authored
40 exit 1
41 end
42 end
43
8a25d7e @brixen Require MSpec gem be installed to run the specs with RSpec.
brixen authored
44 TOLERANCE = 0.00003 unless Object.const_defined?(:TOLERANCE)
45 rescue LoadError
46 puts "Please install the MSpec gem to run the specs."
47 exit 1
48 end
6c1c34a @brixen Ask not what RubySpec can do for you, but what you can do for RubySpec.
brixen authored
49 end
50
3f03b29 @brixen Rewrote Kernel[.#]require specs.
brixen authored
51 CODE_LOADING_DIR = File.expand_path "../fixtures/code", __FILE__
52
2a1a307 @brixen Require mspec version 1.5.17.
brixen authored
53 minimum_version = "1.5.17"
21139b2 @brixen Update version to 0.7.0 and require mspec v1.5.5.
brixen authored
54 unless MSpec::VERSION >= minimum_version
55 puts "Please install MSpec version >= #{minimum_version} to run the specs"
b2e1a2f @brixen Added version.rb to RubySpec and MSpec-version check.
brixen authored
56 exit 1
57 end
58
f4b59ab @brixen No need to turn verbose warnings back on.
brixen authored
59 $VERBOSE = nil unless ENV['OUTPUT_WARNINGS']
Something went wrong with that request. Please try again.