Sha256: ddcc212ce8fa5b1e5a8f995ba40f0d0e3365daba98223f0de70f86be43f7452b

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

require 'support/spec_helpers/simple_machinable'

module CircuitBlueprints
  def ensure_blueprints
    SimpleMachinable.ensure_machinable(Circuit::Site, Circuit::Node)

    if Circuit::Site.blueprint.nil?
      Circuit::Site.blueprint do
        host      { 'example.org' }
        aliases   { %w[www.example.org subdomain.example.com] }
      end
    end

    if Circuit::Node.blueprint.nil?
      Circuit::Node.blueprint do
        slug            { Faker::Lorem.words(rand(3) + 2).join('-') }
        behavior_klass  { "RenderOk" }
      end
    end
  end
  module_function :ensure_blueprints
end

CircuitBlueprints.ensure_blueprints

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
circuit-0.2.0 spec/support/blueprints.rb