Sha256: df3574cec9e528e2a7e2fb095ac38f2bd8fd6019337cbd0317551eec5c6295fc

Contents?: true

Size: 1.03 KB

Versions: 30

Compression:

Stored size: 1.03 KB

Contents

require 'helper'

class TestCommand < Test::Unit::TestCase
  context "when calling .globs" do
    context "when non-default dest & source dirs" do
      setup do
        @source = source_dir
        @dest   = dest_dir
        directory_with_contents(@dest)
        @globs  = Command.globs(@source, @dest)
      end
      should "return an array without the destination dir" do
        assert @globs.is_a?(Array)
        assert !@globs.include?(@dest)
      end
      teardown do
        clear_dest
      end
    end
    context "when using default dest dir" do
      setup do
        @source = test_dir
        @dest   = test_dir('_site')
        directory_with_contents(@dest)
        @globs  = Command.globs(@source, @dest)
      end
      should "return an array without the destination dir" do
        assert @globs.is_a?(Array)
        assert !@globs.include?(@dest)
        @globs.each do |glob|
           assert !glob.include?(File.basename(@dest))
        end
      end
      teardown do
        FileUtils.rm_r(@dest)
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
jekyll-1.5.1 test/test_command.rb
jekyll-2.0.0.alpha.2 test/test_command.rb
jekyll-1.5.0 test/test_command.rb
tigefa-1.1.3 test/test_command.rb
tigefa-1.1.2 test/test_command.rb
jekyll-2.0.0.alpha.1 test/test_command.rb
tigefa-1.1.1 test/test_command.rb
jekyll-1.4.3 test/test_command.rb
jekyll-1.4.2 test/test_command.rb
jekyll-1.4.1 test/test_command.rb
jekyll-1.4.0 test/test_command.rb
jekyll-1.3.1 test/test_command.rb
jekyll-1.3.0 test/test_command.rb
jekyll-1.3.0.rc test/test_command.rb
monad-0.0.3 test/test_command.rb
jekyll-1.2.1 test/test_command.rb
jekyll-1.2.0 test/test_command.rb
jekyll-1.0.4 test/test_command.rb
jekyll-1.1.2 test/test_command.rb
jekyll-1.1.1 test/test_command.rb