Sha256: 131b002bcbc04cd26818169366654b37a0ead30d07e68635e68d610bc76084fe
Contents?: true
Size: 731 Bytes
Versions: 18
Compression:
Stored size: 731 Bytes
Contents
# frozen_string_literal: true require "hanami/config" require "uri" RSpec.describe Hanami::Config, "base_url" do subject(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::app" } it "defaults to a URI of 'http://0.0.0.0:2300'" do expect(config.base_url).to eq URI("http://0.0.0.0:2300") end it "can be changed to another URI via a string" do expect { config.base_url = "http://example.com" } .to change { config.base_url } .to(URI("http://example.com")) end it "can be changed to another URI object" do expect { config.base_url = URI("http://example.com") } .to change { config.base_url } .to(URI("http://example.com")) end end
Version data entries
18 entries across 18 versions & 1 rubygems