Skip to content
Browse files

get example_specs to run

  • Loading branch information...
1 parent 7ad6b4a commit 538dc8a08ef976001bcd145d7a33f23f75f62515 @dchelimsky dchelimsky committed
View
9 example_specs/failing/spec_helper.rb
@@ -1,8 +1 @@
-lib_path = File.expand_path('../../../lib', __FILE__)
-$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
-require 'rspec/autorun'
-require 'rspec/expectations'
-
-Rspec::Core.configure do |c|
- c.include Rspec::Matchers
-end
+require File.expand_path('../../spec_helper.rb', __FILE__)
View
15 example_specs/passing/spec_helper.rb
@@ -1,14 +1 @@
-lib_path = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
-$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
-require 'rspec/autorun'
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/../../../expectations/lib'))
-require 'rspec/expectations'
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/../../../mocks/lib'))
-require 'rspec/mocks'
-
-Rspec::Core::ExampleGroup.send(:include, Rspec::Matchers)
-
-Rspec::Core.configure do |c|
- c.mock_framework = :rspec
- c.color_enabled = true
-end
+require File.expand_path('../../spec_helper.rb', __FILE__)
View
11 example_specs/spec_helper.rb
@@ -0,0 +1,11 @@
+$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
+$LOAD_PATH << File.expand_path('../../../rspec-expectations/lib', __FILE__)
+$LOAD_PATH << File.expand_path('../../../rspec-mocks/lib', __FILE__)
+require 'rspec/expectations'
+require 'rspec/autorun'
+
+Rspec::Core.configure do |c|
+ c.mock_with :rspec
+ c.include Rspec::Matchers
+end
+
View
1 lib/rspec/core/configuration.rb
@@ -215,6 +215,5 @@ def find_advice(desired_advice_type, desired_each_or_all, group)
end
end
-
end
end

0 comments on commit 538dc8a

Please sign in to comment.
Something went wrong with that request. Please try again.