Sha256: f41ab7f974a6d329d8c3841e3581d03d12d216139c4f003b9d84c35a755b0ae2
Contents?: true
Size: 791 Bytes
Versions: 1
Compression:
Stored size: 791 Bytes
Contents
require "spec_helper" describe Nachos::CLI do it "sorts watched repos" do watched_repos = [] repos = %w[zaphod/beta zaphod/aardvark matt/foo aaron/baz] repos.each do |repo| owner, name = repo.split("/") watched_repos << { "url" => "http://github.com/#{repo}", "name" => name, "owner" => owner } end body = { "repositories" => watched_repos }.to_json url = "http://github.com/api/v2/json/repos/watched/johndoe?" FakeWeb.register_uri(:get, url, :body => body) github = Nachos::Github.new("johndoe", "token") github.watched.map {|r| r["url"] }.should == %w[ http://github.com/aaron/baz http://github.com/matt/foo http://github.com/zaphod/aardvark http://github.com/zaphod/beta] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nachos-0.0.1 | spec/nachos/github_spec.rb |