spec/spec_helper.rb in oct-0.2.0 vs spec/spec_helper.rb in oct-0.3.1
- old
+ new
@@ -1,35 +1,11 @@
-$LOAD_PATH.unshift File.expand_path('..', __FILE__) unless
- $LOAD_PATH.include? File.expand_path('..', __FILE__)
-$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) unless
- $LOAD_PATH.include? File.expand_path('../../lib', __FILE__)
-
-require 'rubygems'
require 'oct'
-require 'spec'
-require 'spec/autorun'
+require 'rspec/core'
require 'aruba/api'
+require 'aruba_helper'
-# aruba helpers
-#
-# @return full path to files in the aruba tmp folder
-def fullpath(filename)
- path = File.expand_path(File.join(current_dir, filename))
- if path.match(/^\/cygdrive/)
- # match /cygdrive/c/path/to and return c:\\path\\to
- path = `cygpath -w #{path}`.chomp
- elsif path.match(/.\:/)
- # match c:/path/to and return c:\\path\\to
- path = path.gsub(/\//, '\\')
- end
- path
-end
-# @return the contents of "filename" in the aruba tmp folder
-def get_file_contents(filename)
- in_current_dir do
- IO.read(filename)
- end
-end
-
-Spec::Runner.configure do |config|
- config.include Aruba::Api
+RSpec.configure do |config|
+ config.include Aruba::Api
+ config.filter_run :focus => true
+ config.run_all_when_everything_filtered = true
+ config.treat_symbols_as_metadata_keys_with_true_values = true
end