Sha256: 1bd2e5588f107b103035671b624a686f68bd9315d2e45297c4884afbfda6e1c3
Contents?: true
Size: 1.06 KB
Versions: 9
Compression:
Stored size: 1.06 KB
Contents
require File.expand_path("../spec_helper", File.dirname(__FILE__)) describe Youroom::UnreadTimeline do describe "#path" do describe "when url is original" do before do @client = Youroom::UnreadTimeline.new(access_token) end subject { @client.path } it { should == File.join(Youroom::BASE_URL, '?format=json&read_state=unread')} end describe "when url is not original" do before do @client = Youroom::UnreadTimeline.new(access_token, WW_URL) end subject { @client.path } it { should == File.join(WW_URL, 'home', '?format=json&read_state=unread') } end end describe "#call" do before do @client = Youroom::UnreadTimeline.new(access_token, WW_URL) WW::Server.mock(:youroom, { :format => "json", :read_state => "unread" }).get("/youroom/home/") do { :entry => "hogehoge" }.to_json end end after do WW::Server.verify(:youroom) end subject { @client.get } it "should call request url" do should be_a_instance_of(Hash) end end end
Version data entries
9 entries across 9 versions & 1 rubygems