Sha256: 5fb0c12d620561b3ac898d822eac392944dcaac24b313d7cd0c34af3bb9da2b4

Contents?: true

Size: 656 Bytes

Versions: 15

Compression:

Stored size: 656 Bytes

Contents

class SiteHub
  class Cookie
    describe Flag do
      let(:name) { 'flag' }
      let(:string_sanitiser) { Object.new.tap { |object| object.extend(StringUtils) } }
      subject do
        described_class.new(name)
      end

      describe '#initialize' do
        it 'stores the value as a symbol' do
          expect(subject.name).to eq(name.to_sym)
        end

        it 'sanitises the string parameter' do
          expect(described_class.new("#{name} \n").name).to eq(name.to_sym)
        end
      end

      describe '#to_s' do
        it 'returns the name' do
          expect(subject.to_s).to eq(name)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sitehub-0.5.0.alpha12 spec/sitehub/cookie/flag_spec.rb
sitehub-0.4.10 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha11 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha10 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha8 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha7 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha6 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha5 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha4 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha3 spec/sitehub/cookie/flag_spec.rb
sitehub-0.5.0.alpha2 spec/sitehub/cookie/flag_spec.rb
sitehub-0.4.9 spec/sitehub/cookie/flag_spec.rb
sitehub-0.4.8 spec/sitehub/cookie/flag_spec.rb
sitehub-0.4.7 spec/sitehub/cookie/flag_spec.rb
sitehub-0.4.6 spec/sitehub/cookie/flag_spec.rb