Sha256: 9caa4571579812d3758c50ad6bb73860d720e6f954b0d6f0a1207d4f1be1f88d
Contents?: true
Size: 823 Bytes
Versions: 4
Compression:
Stored size: 823 Bytes
Contents
require 'vhost_generator/application' require 'ostruct' describe VhostGenerator::Application do describe "Env" do let(:config) { OpenStruct.new } before { subject.config = config } options = Hash[ 'static_folder' => 'STATIC_FOLDER', 'server_ports' => 'SERVER_PORTS', 'server_names' => 'SERVER_NAMES', 'instance_ports' => 'INSTANCE_PORTS', 'relative_root' => 'RAILS_RELATIVE_URL_ROOT', 'generator' => 'GENERATOR', 'generator_options' => 'GENERATOR_OPTIONS', ] options.each_pair do |name, var| describe "#{name} option" do it "is set by the #{var} variable" do expect { subject.handle_env(var => 'value') }.to change(config, name).to('value') end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems