Sha256: b829ff6600db2703cb75c354ece58f065a18db521c27696478f4ce0102888908
Contents?: true
Size: 752 Bytes
Versions: 83
Compression:
Stored size: 752 Bytes
Contents
require 'spec_helper' describe Tenon::MySettings do describe '.full_url' do ['http://', 'https://'].each do |protocol| context "when the URL starts with #{protocol}" do before do Tenon::MySettings.site_url = "#{protocol}www.factore.ca" end it 'should just give us the site_url' do expect(Tenon::MySettings.full_url).to eq(Tenon::MySettings.site_url) end end end context 'when the URL is not preceded by a protocol' do before do Tenon::MySettings.site_url = 'www.factore.ca' end it "should prepend 'http://' to the site_url" do expect(Tenon::MySettings.full_url).to eq("http://#{Tenon::MySettings.site_url}") end end end end
Version data entries
83 entries across 83 versions & 1 rubygems