diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 37566d3..ebaf979 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,3 @@ -require 'bundler/setup' require 'docbookrx' -Dir[File.join(File.dirname(__FILE__), 'support/extensions/**/*.rb')].each { |file| require file } -Dir[File.join(File.dirname(__FILE__), 'support/kit/**/*.rb')].each { |file| require file } + +Dir[(File.join (File.dirname __FILE__), 'support/**/*.rb')].each {|file| require file } diff --git a/spec/support/kit/default_config.rb b/spec/support/default_config.rb similarity index 100% rename from spec/support/kit/default_config.rb rename to spec/support/default_config.rb diff --git a/spec/support/extensions/helpers.rb b/spec/support/helpers.rb similarity index 100% rename from spec/support/extensions/helpers.rb rename to spec/support/helpers.rb diff --git a/spec/support/kit/stderr.rb b/spec/support/kit/stderr.rb deleted file mode 100644 index aa15247..0000000 --- a/spec/support/kit/stderr.rb +++ /dev/null @@ -1,7 +0,0 @@ -if ENV['SUPPRESS_STDERR'] == 'enabled' - RSpec.configure do |config| - stderr_original = $stderr - config.before(:suite) { $stderr = File.new '/dev/null', 'w' } - config.after(:suite) { $stderr = stderr_original } - end -end diff --git a/spec/support/kit/stdout.rb b/spec/support/kit/stdout.rb deleted file mode 100644 index b8b9e01..0000000 --- a/spec/support/kit/stdout.rb +++ /dev/null @@ -1,7 +0,0 @@ -if ENV['SUPPRESS_STDOUT'] == 'enabled' - RSpec.configure do |config| - stdout_original = $stdout - config.before(:suite) { $stdout = File.new '/dev/null', 'w' } - config.after(:suite) { $stdout = stdout_original } - end -end diff --git a/spec/support/kit/temp_dir.rb b/spec/support/kit/temp_dir.rb deleted file mode 100644 index 16ba484..0000000 --- a/spec/support/kit/temp_dir.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'rspec/core/shared_context' - -module RSpec - module Kit - # Adds temp directory support to specs enabled with the :temp_dir metadata key. - module TempDirContext - extend RSpec::Core::SharedContext - let(:temp_dir) { File.expand_path '../../../../tmp/rspec', __FILE__ } - end - end -end - -RSpec.configure do |config| - config.include RSpec::Kit::TempDirContext - - config.before do |example| - FileUtils.mkdir_p(temp_dir) if example.metadata[:temp_dir] - end - - config.after do |example| - FileUtils.rm_rf(temp_dir) if example.metadata[:temp_dir] - end -end