Sha256: b0408ab416e1f3f0b4378b6a2e3fc8da77efea2d89989b0bee7eb2860f99cac6
Contents?: true
Size: 1.23 KB
Versions: 8
Compression:
Stored size: 1.23 KB
Contents
require File.dirname(__FILE__) + '/test_helper.rb' require 'fileutils' require 'dojo-pkg' class TestDojo < Test::Unit::TestCase def setup @test_sandbox_dir = File.join(File.dirname(__FILE__), "sandbox") @good_base_dir = File.join(@test_sandbox_dir, "public", "javascripts") @bad_base_dir = File.join(@test_sandbox_dir, "public", "badbase") FileUtils.mkdir_p(@good_base_dir) FileUtils.mkdir_p(@bad_base_dir) end def teardown FileUtils.remove_dir(@test_sandbox_dir) end def test_install cmd = Dojo::Commands::Dojofy.new assert_kind_of Dojo::Commands::Dojofy, cmd Dir.chdir(@test_sandbox_dir) do cmd.install end assert_block "Dojo wasn't installed or doesn't exist where we expect it to be." do (File.directory?(File.join(@good_base_dir, "dojo")) and File.directory?(File.join(@good_base_dir, "dojo", "dojo")) and File.directory?(File.join(@good_base_dir, "dojo", "dijit")) and File.directory?(File.join(@good_base_dir, "dojo", "dojox")) and File.directory?(File.join(@good_base_dir, "dojo", "util")) and File.exists?(File.join(@good_base_dir, "dojo", "dojo", "dojo.js"))) end end end
Version data entries
8 entries across 8 versions & 1 rubygems