Sha256: 1897e57ffb7721106f0d5f650330e7be67539a5ae1d15828a260aeef24816ccf

Contents?: true

Size: 462 Bytes

Versions: 6

Compression:

Stored size: 462 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

6 entries across 6 versions & 1 rubygems

Version Path
nanoc-4.0.0b2 test/extra/checking/test_dsl.rb
nanoc-4.0.0b1 test/extra/checking/test_dsl.rb
nanoc-4.0.0a2 test/extra/checking/test_dsl.rb
nanoc-4.0.0a1 test/extra/checking/test_dsl.rb
nanoc-3.8.0 test/extra/checking/test_dsl.rb
nanoc-3.7.5 test/extra/checking/test_dsl.rb