Sha256: eebf7d594300582d7a29aa854fdea6d27cb8917d83cb02884a064382d71857a5

Contents?: true

Size: 907 Bytes

Versions: 4

Compression:

Stored size: 907 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,
    osx: false,
    linux: 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

4 entries across 4 versions & 1 rubygems

Version Path
kitabu-2.1.0 spec/spec_helper.rb
kitabu-2.0.4 spec/spec_helper.rb
kitabu-2.0.3 spec/spec_helper.rb
kitabu-2.0.2 spec/spec_helper.rb