spec/ubi/memorias/site_spec.rb in ubi-0.0.3 vs spec/ubi/memorias/site_spec.rb in ubi-0.0.5

- old
+ new

@@ -1,13 +1,17 @@ require 'spec_helper' describe Memoria::Site do describe 'simple test' do - subject { Memoria::Site.parse('bla bla me@somesite.com') } + subject { Memoria::Site.parse('bla bla somesite.com') } it { is_expected.to include(Memoria::Site) } it { is_expected.to be_an Array } + + it 'should have text reader method' do + expect(subject[0].text).to eq('somesite.com') + end end describe 'parsed' do def parse(site) Memoria::Site.parse(site).first.to_s @@ -15,11 +19,11 @@ describe 'http' do let(:parsed) { 'http://fubah.com' } it { expect(parse('fubah.com')).to eq(parsed) } - it { expect(parse('@fubah.com')).to eq('http://@fubah.com') } - it { expect(parse('fu@fubah.com')).to eq('http://fu@fubah.com') } + it { expect(parse('@fubah.com')).to eq(parsed) } # 'http://@fubah.com') } + it { expect(parse('fu@fubah.com')).to eq(parsed) } # 'http://fu@fubah.com') } it { expect(parse('http://fubah.com')).to eq(parsed) } it { expect(parse('http://fubah.com/56')).to eq(parsed + '/56') } end describe 'https' do