Sha256: 86a13119c02af2245050bdac6469bef099dc8f902274a9a58cc320b5c6c601d1
Contents?: true
Size: 861 Bytes
Versions: 1
Compression:
Stored size: 861 Bytes
Contents
require 'spec_helper' describe HatebuWatcher do let(:url) { 'http://www.example.com/' } let(:interval) { 10 } describe HatebuWatcher::Parameters do context 'when receive valid parameters' do let(:params) { HatebuWatcher::Parameters.new([url, interval]) } it 'should return correct value' do expect(params.url).to eq url expect(params.interval).to eq interval end end context 'when receive invalid parameters' do let(:params) { HatebuWatcher::Parameters.new(['www.example.com']) } it 'should raise error' do expect { params } .to raise_error(ArgumentError) end end end describe HatebuWatcher::Counter do let(:count) { HatebuWatcher::Counter.new(url).reload.count } it 'should return correct value' do expect(count).to be > 100 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hatebu_watcher-0.0.1 | spec/hatebu_watcher_spec.rb |