Sha256: 1e083d57b32f153ab9bae7b79569cc399e508c331529e49aa723356a0b32258f
Contents?: true
Size: 706 Bytes
Versions: 1
Compression:
Stored size: 706 Bytes
Contents
require 'spec_helper' describe LinkThumbnailer::URI do let(:uri) { 'http://foo.com' } let(:instance) { described_class.new(uri) } describe '#valid?' do let(:action) { instance.send(:valid?) } context 'when bad format' do before do allow(instance).to receive(:attribute).and_return("/invalid/path") end it { expect(action).to be_falsey } end context 'when valid format' do before do allow(instance).to receive(:attribute).and_return("http://foo.com") end it { expect(action).to be_truthy } end end describe '#to_s' do let(:action) { instance.to_s } it { expect(action).to eq(uri) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
link_thumbnailer-3.3.1 | spec/uri_spec.rb |