Sha256: 92a724b9382b030ce2ccec5e5af218626f689d6fcbc078bfe669eea91d72b50a
Contents?: true
Size: 864 Bytes
Versions: 8
Compression:
Stored size: 864 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. test_helper])) unless defined?(Juicer) class TestVerifyCommand < Test::Unit::TestCase def setup @io = StringIO.new @command = Juicer::Command::Verify.new(Logger.new(@io)) end def test_no_files assert_raise ArgumentError do @command.execute [] end end def test_installer_not_found Juicer.home = path("somewhere") assert_raise FileNotFoundError do @command.execute path("a.js") end end def test_verify_several_files Juicer.home = path(".juicer") installer = Juicer::Install::JSLintInstaller.new(path(".juicer")) installer.install unless installer.installed? @command.execute([path("ok.js"), path("not-ok.js"), path("a.js")]) assert_match(/OK!/, @io.string) assert_match(/Problems detected/, @io.string) end end
Version data entries
8 entries across 8 versions & 2 rubygems