require_relative './test_config' require 'hws_strings' describe HWSStrings do context '#component_encode,#component_decode' do it "ensure a string doesn't have a forward slash" do str = 'test/string' encoded = HWSStrings.component_encode(str) expect(encoded).to_not include('/') end it "ensure a string with a forward slash can be decoded back" do str = 'test/string' encoded = HWSStrings.component_encode(str) decoded = HWSStrings.component_decode(str) expect(decoded).to eq(str) end end context '#gf_encode,#gf_decode' do it "ensure a repo name doesn't have a forward slash" do str = 'test/string' encoded = HWSStrings.gf_encode(str) expect(encoded).to_not include('/') end it "ensure a repo name with a forward slash can be decoded back" do str = 'test/string' encoded = HWSStrings.gf_encode(str) decoded = HWSStrings.gf_decode(encoded) expect(decoded).to eq(str) end end end