spec/spec_helper.rb in rambo_ruby-0.1.0 vs spec/spec_helper.rb in rambo_ruby-0.2.0
- old
+ new
@@ -8,13 +8,13 @@
require "rspec/expectations"
require "raml-rb"
require "json_test_data"
require "fileutils"
-lib = File.expand_path("../../lib", __FILE__)
SPEC_DIR_ROOT = File.expand_path("../", __FILE__)
-
-Dir.foreach("#{lib}") {|f| require f if f.match(/.*\.rb\z/) }
+RAMBO_ROOT = File.expand_path("../../lib", __FILE__)
+lib = File.expand_path(File.join(RAMBO_ROOT, "**/*.rb"))
+Dir[lib].each {|f| require f }
RSpec.configure do |c|
c.disable_monkey_patching!
c.order = :random