spec/spec_helper.rb in belajar-0.1.1 vs spec/spec_helper.rb in belajar-1.0.0

- old
+ new

@@ -1,20 +1,19 @@ require 'rspec' require 'webmock/rspec' def require_files_from(paths = []) paths.each do |path| - Dir[File.join(File.expand_path("#{path}*.rb", __FILE__))].sort.each do |file| - require file - end + files = Dir[File.join(File.expand_path("#{path}*.rb", __FILE__))].sort + files.each { |file| require file } end end RSpec.configure do |config| config.color = true require File.expand_path('../../lib/belajar', __FILE__) - require_files_from ["../support/**/"] + require_files_from ['../support/**/'] config.include TestHelpers config.before(:each, type: :view) { mock_default_window }