Sha256: 8e489458ec9241dee8dc10b70588297083a1ec93512b419d739c3bdb4550c3a7

Contents?: true

Size: 612 Bytes

Versions: 30

Compression:

Stored size: 612 Bytes

Contents

require 'spout/tests/json_helper'

module Spout
  module Tests
    module DomainSpecified

      def assert_domain_specified(domain_name, msg = nil)
        full_message = build_message(msg, "Variables of type choices need to specify a domain.")
        assert_block(full_message) do
          domain_name != nil
        end
      end

      Dir.glob("variables/**/*.json").each do |file|
        if json_value(file, :type) == "choices"
          define_method("test_domain_specified:"+file) do
            assert_domain_specified json_value(file, :domain)
          end
        end
      end

    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
spout-0.6.0.beta7 lib/spout/tests/domain_specified.rb
spout-0.6.0.beta6 lib/spout/tests/domain_specified.rb
spout-0.6.0.beta5 lib/spout/tests/domain_specified.rb
spout-0.6.0.beta4 lib/spout/tests/domain_specified.rb
spout-0.6.0.beta3 lib/spout/tests/domain_specified.rb
spout-0.6.0.beta2 lib/spout/tests/domain_specified.rb
spout-0.6.0.beta1 lib/spout/tests/domain_specified.rb
spout-0.5.0 lib/spout/tests/domain_specified.rb
spout-0.5.0.beta3 lib/spout/tests/domain_specified.rb
spout-0.5.0.beta2 lib/spout/tests/domain_specified.rb