Sha256: 1a4360166e6f9c847bb4c16329b19c9cc9741ac3564809e44a5a6e95084c3009

Contents?: true

Size: 856 Bytes

Versions: 2

Compression:

Stored size: 856 Bytes

Contents

require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

require "bundler/setup"

require "kitabu"
require "pathname"

SPECDIR = Pathname.new(File.dirname(__FILE__))
TMPDIR = SPECDIR.join("tmp")

Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|r| require r}

# Disable the bundle install command.
# TODO: Figure out the best way of doing it so.
class Kitabu::Generator < Thor::Group
  def bundle_install
  end
end

RSpec.configure do |config|
  config.include(SpecHelper)
  config.include(Matchers)

  config.filter_run_excluding html2text: false, kindlegen: false, prince: false

  cleaner = proc do
    [TMPDIR].each do |i|
      FileUtils.rm_rf(i) if File.exist?(i)
    end

    Dir.chdir File.expand_path('../..', __FILE__)
  end

  config.before(&cleaner)
  config.after(&cleaner)
  config.before { FileUtils.mkdir_p(TMPDIR) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kitabu-2.0.1 spec/spec_helper.rb
kitabu-2.0.0 spec/spec_helper.rb