spec/lib/github_api_spec.rb in kraken-build-0.0.4 vs spec/lib/github_api_spec.rb in kraken-build-0.0.5

- old
+ new

@@ -3,20 +3,21 @@ describe GithubApi do before(:each) do @options = {:token => '1234', :owner => "FooBert", - :repository => "uber-repo" + :repository => "uber-repo", + :headers => {"User-Agent" => "Kraken-Build"} } @api = GithubApi.new(@options) end it "returns the branches of a Github repository" do response = [] response << {"name" => "foo"} response << {"name" => "bar"} - @api.class.should_receive(:get).with("/repos/#{@options[:owner]}/#{@options[:repository]}/branches?access_token=#{@options[:token]}",{}).and_return(response) + @api.class.should_receive(:get).with("/repos/#{@options[:owner]}/#{@options[:repository]}/branches?access_token=#{@options[:token]}", :headers => @options[:headers]).and_return(response) branches = @api.get_branches branches.should include "foo" branches.should include "bar" end