Don't run main for tests

pull/7/head
Nemo 3 years ago
parent db6d1c2c82
commit 2c07c5940d
  1. 7
      spec/spec_helper.cr
  2. 4
      src/errors/invalid_link.cr
  3. 5
      src/fetch.cr
  4. 6
      src/muse-dl.cr

@ -1,2 +1,7 @@
require "spec"
require "../src/muse-dl"
require "../src/book"
require "../src/parser"
require "../src/fetch"
require "../src/journal"
require "../src/pdftk"
require "../src/thing"

@ -0,0 +1,4 @@
module Muse::Dl::Errors
class InvalidLink < Exception
end
end

@ -1,4 +1,5 @@
require "crest"
require "./errors/*"
module Muse::Dl
class Fetch
@ -14,10 +15,10 @@ module Muse::Dl
return Muse::Dl::Journal.new response
end
rescue ex : Crest::NotFound
raise Muse::Dl::InvalidLink
raise Muse::Dl::Errors::InvalidLink
end
else
raise Muse::Dl::InvalidLink
raise Muse::Dl::Errors::InvalidLink
end
end
end

@ -3,9 +3,15 @@ require "./pdftk.cr"
require "./fetch.cr"
require "./book.cr"
# require "./journal.cr"
# TODO: Write documentation for `Muse::Dl`
module Muse::Dl
VERSION = "0.1.0"
# TODO: Put your code here
class Main
def self.run
end
end
end

Loading…
Cancel
Save