Sha256: 037679f31674753c9e28c58856e1ed0c4eb55cfd21ee82a10e3b53ce21e9b053
Contents?: true
Size: 1.08 KB
Versions: 7
Compression:
Stored size: 1.08 KB
Contents
require 'spec_helper' describe Mushikago::Tombo::CapturesRequest do before :all do @request = Mushikago::Tombo::CapturesRequest.new end subject{ @request } it{ should respond_to(:id) } it{ should respond_to(:limit) } it{ should respond_to(:offset) } it{ should respond_to(:domain) } it{ should respond_to(:tag) } context 'with options' do before :all do options = { :id => 'id', :limit => '2', :offset => '5', :domain => 'hogehoge.com', :tag => 'tag', } @request = Mushikago::Tombo::CapturesRequest.new(options) end subject{ @request } it{ subject.host.should == Mushikago.config.tombo_endpoint } it{ subject.http_method.should == 'GET' } it{ subject.path.should == '/1/captures.json' } it{ subject.id.should == 'id' } it{ subject.limit.should == '2' } it{ subject.offset.should == '5' } it{ subject.domain.should == 'hogehoge.com' } it{ subject.tag.should == 'tag' } it{ subject.url_encoded_params.should == 'domain=hogehoge.com&id=id&limit=2&offset=5&tag=tag' } end end
Version data entries
7 entries across 7 versions & 1 rubygems