Sha256: 389c43392f885a39d34bf10ae9bbad6875f7ed125ea0b01800e2854070b49fdc

Contents?: true

Size: 504 Bytes

Versions: 5

Compression:

Stored size: 504 Bytes

Contents

# encoding: utf-8

class Nanoc::Extra::Checking::DSLTest < MiniTest::Unit::TestCase

  include Nanoc::TestHelpers

  def test_from_file
    with_site do |site|
      File.open('Checks', 'w') { |io| io.write("check :foo do\n\nend\ndeploy_check :bar\n") }
      dsl = Nanoc::Extra::Checking::DSL.from_file('Checks')

      # One new check
      refute Nanoc::Extra::Checking::Check.named(:foo).nil?

      # One check marked for deployment
      assert_equal [ :bar ], dsl.deploy_checks
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nanoc-3.6.1 test/extra/checking/test_dsl.rb
nanoc-3.6.0 test/extra/checking/test_dsl.rb
nanoc-3.5.0 test/extra/checking/test_dsl.rb
nanoc-3.5.0b2 test/extra/checking/test_dsl.rb
nanoc-3.5.0b1 test/extra/checking/test_dsl.rb