Sha256: c7ffadc6f50d4d50eb0083ab6fd370a7761145f31f9e3aecf42a4fa12f0d1768

Contents?: true

Size: 465 Bytes

Versions: 14

Compression:

Stored size: 465 Bytes

Contents

# encoding: utf-8

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

  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

14 entries across 14 versions & 1 rubygems

Version Path
nanoc-3.7.3 test/extra/checking/test_dsl.rb
nanoc-3.7.2 test/extra/checking/test_dsl.rb
nanoc-3.7.1 test/extra/checking/test_dsl.rb
nanoc-3.7.0 test/extra/checking/test_dsl.rb
nanoc-3.6.11 test/extra/checking/test_dsl.rb
nanoc-3.6.10 test/extra/checking/test_dsl.rb
nanoc-3.6.9 test/extra/checking/test_dsl.rb
nanoc-3.6.8 test/extra/checking/test_dsl.rb
nanoc-3.6.7 test/extra/checking/test_dsl.rb
nanoc-3.6.6 test/extra/checking/test_dsl.rb
nanoc-3.6.5 test/extra/checking/test_dsl.rb
nanoc-3.6.4 test/extra/checking/test_dsl.rb
nanoc-3.6.3 test/extra/checking/test_dsl.rb
nanoc-3.6.2 test/extra/checking/test_dsl.rb