Sha256: 120b7174357404a0e8c60648f82a0e034bd48002522dafc8ae5cc4062fdc930d

Contents?: true

Size: 693 Bytes

Versions: 9

Compression:

Stored size: 693 Bytes

Contents

require "kitabu"
require "pathname"
require "test_notifier/runner/rspec"

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

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

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

  cleaner = proc do
    [
      TMPDIR,
      SPECDIR.join("support/mybook/output/mybook.pdf"),
      SPECDIR.join("support/mybook/output/mybook.epub"),
      SPECDIR.join("support/mybook/output/mybook.html")
    ].each do |i|
      FileUtils.rm_rf(i) if File.exist?(i)
    end
  end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kitabu-1.0.5 spec/spec_helper.rb
kitabu-1.0.4 spec/spec_helper.rb
kitabu-1.0.3 spec/spec_helper.rb
kitabu-1.0.2 spec/spec_helper.rb
kitabu-1.0.1 spec/spec_helper.rb
kitabu-1.0.0 spec/spec_helper.rb
kitabu-1.0.0.rc4 spec/spec_helper.rb
kitabu-1.0.0.rc3 spec/spec_helper.rb
kitabu-1.0.0.rc2 spec/spec_helper.rb