Permalink
Browse files

Change remaining be_true expectations to eq(true)

  • Loading branch information...
joeyw committed Dec 4, 2012
1 parent 8c4b8a0 commit 3d5b1607d22cf0de83a882c3aee0fc70ff600e92
@@ -53,7 +53,7 @@
stub_delete('/authorizations/999999').
to_return(:status => 204)
result = @client.delete_authorization(999999)
- expect(result).to be_true
+ expect(result).to eq(true)
end
context "when working with tokens" do
@@ -239,7 +239,7 @@
stub_delete("/repos/sferik/rails_admin/comments/860296").
to_return(:status => 204, :body => "")
commit_comment = @client.delete_commit_comment("sferik/rails_admin", "860296")
- expect(commit_comment).to be_true
+ expect(commit_comment).to eq(true)
end
end
@@ -56,7 +56,7 @@
it "deletes a download" do
stub_request(:delete, "https://api.github.com/repos/octocat/Hellow-World/downloads/165347").
to_return(:status => 204, :body => "", :headers => {})
- expect(@client.delete_download('octocat/Hellow-World', 165347)).to be_true
+ expect(@client.delete_download('octocat/Hellow-World', 165347)).to eq(true)
end
end
@@ -86,23 +86,23 @@
it "stars an existing gist" do
stub_put("/gists/12345/star").to_return(:status => 204)
success = @client.star_gist(12345)
- expect(success).to be_true
+ expect(success).to eq(true)
end
end
describe ".unstar_gist" do
it "unstars an existing gist" do
stub_delete("/gists/12345/star").to_return(:status => 204)
success = @client.unstar_gist(12345)
- expect(success).to be_true
+ expect(success).to eq(true)
end
end
describe ".gist_starred?" do
it "is starred" do
stub_get("/gists/12345/star").to_return(:status => 204)
starred = @client.gist_starred?(12345)
- expect(starred).to be_true
+ expect(starred).to eq(true)
end
it "is not starred" do
@@ -126,7 +126,7 @@
it "deletes an existing gist" do
stub_delete("/gists/12345").to_return(:status => 204)
deleted = @client.delete_gist(12345)
- expect(deleted).to be_true
+ expect(deleted).to eq(true)
end
end
@@ -171,7 +171,7 @@
it "deletes a gist comment" do
stub_delete("/gists/4bcad24/comments/12345").to_return(:status => 204)
result = @client.delete_gist_comment("4bcad24", 12345)
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -166,7 +166,7 @@
stub_delete("/repos/pengwynn/octokit/issues/comments/1194549").
to_return(:status => 204)
result = @client.delete_comment("pengwynn/octokit", 1194549)
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -72,7 +72,7 @@
to_return(:status => 204)
result = @client.delete_label!("pengwynn/octokit", "V3 Transition")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -96,7 +96,7 @@
to_return(:status => 204)
result = @client.remove_all_labels('pengwynn/octokit', 23)
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -59,7 +59,7 @@
stub_delete("/repos/pengwynn/octokit/milestones/2").
to_return(:status => 204, :body => "", :headers => {})
result = @client.delete_milestone("pengwynn/octokit", 2)
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -14,7 +14,7 @@
to_return(json_response("notifications.json"))
notifications = @client.notifications
expect(notifications.first.id).to eq(1)
- expect(notifications.first.unread).to be_true
+ expect(notifications.first.unread).to eq(true)
end
end
@@ -26,7 +26,7 @@
to_return(json_response("repository_notifications.json"))
notifications = @client.repository_notifications("pengwynn/octokit")
expect(notifications.first.id).to eq(1)
- expect(notifications.first.unread).to be_true
+ expect(notifications.first.unread).to eq(true)
end
end
@@ -37,7 +37,7 @@
stub_put("https://api.github.com/notifications").
to_return(:status => 205)
result = @client.mark_notifications_as_read
- expect(result).to be_true
+ expect(result).to eq(true)
end
it "returns false when unsuccessful" do
@@ -55,7 +55,7 @@
stub_put("https://api.github.com/repos/pengwynn/octokit/notifications").
to_return(:status => 205)
result = @client.mark_repository_notifications_as_read("pengwynn/octokit")
- expect(result).to be_true
+ expect(result).to eq(true)
end
it "returns false when unsuccessful" do
@@ -74,7 +74,7 @@
to_return(json_response('notification_thread.json'))
notifications = @client.thread_notifications(1)
expect(notifications.first.id).to eq(1)
- expect(notifications.first.unread).to be_true
+ expect(notifications.first.unread).to eq(true)
end
end
@@ -85,7 +85,7 @@
stub_patch("https://api.github.com/notifications/threads/1").
to_return(:status => 205)
result = @client.mark_thread_as_read(1)
- expect(result).to be_true
+ expect(result).to eq(true)
end
it "returns false when unsuccessful" do
@@ -103,7 +103,7 @@
stub_get("https://api.github.com/notifications/threads/1/subscription").
to_return(json_response("thread_subscription.json"))
subscription = @client.thread_subscription(1)
- expect(subscription.subscribed).to be_true
+ expect(subscription.subscribed).to eq(true)
end
end
@@ -114,7 +114,7 @@
stub_put("https://api.github.com/notifications/threads/1/subscription").
to_return(json_response("thread_subscription_update.json"))
subscription = @client.update_thread_subscription(1, :subscribed => true)
- expect(subscription.subscribed).to be_true
+ expect(subscription.subscribed).to eq(true)
end
end
@@ -125,7 +125,7 @@
stub_delete("https://api.github.com/notifications/threads/1").
to_return(:status => 204)
result = @client.delete_thread_subscription(1)
- expect(result).to be_true
+ expect(result).to eq(true)
end
it "returns false when subscription deletion fails" do
@@ -86,7 +86,7 @@
stub_get("https://api.github.com/orgs/github/members/pengwynn").
to_return(:status => 204)
is_hubbernaut = @client.organization_member?('github', 'pengwynn')
- expect(is_hubbernaut).to be_true
+ expect(is_hubbernaut).to eq(true)
end
end
@@ -112,7 +112,7 @@
stub_get("https://api.github.com/orgs/github/public_members/pengwynn").
to_return(:status => 204)
is_hubbernaut = @client.organization_public_member?('github', 'pengwynn')
- expect(is_hubbernaut).to be_true
+ expect(is_hubbernaut).to eq(true)
end
end
@@ -182,7 +182,7 @@
stub_delete("https://api.github.com/teams/32598").
to_return(:status => 204)
result = @client.delete_team(32598)
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -206,7 +206,7 @@
with(:name => "sferik").
to_return(:status => 204)
result = @client.add_team_member(32598, "sferik")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -217,7 +217,7 @@
stub_delete("https://api.github.com/teams/32598/members/sferik").
to_return(:status => 204)
result = @client.remove_team_member(32598, "sferik")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -227,7 +227,7 @@
stub_delete("https://api.github.com/orgs/codeforamerica/members/glow-mdsol").
to_return(:status => 204)
result = @client.remove_organization_member("codeforamerica", "glow-mdsol")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -250,7 +250,7 @@
with(:name => "reddavis/One40Proof").
to_return(:status => 204)
result = @client.add_team_repository(32598, "reddavis/One40Proof")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -261,7 +261,7 @@
stub_delete("https://api.github.com/teams/32598/repos/reddavis/One40Proof").
to_return(:status => 204)
result = @client.remove_team_repository(32598, "reddavis/One40Proof")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -273,7 +273,7 @@
with(:name => "sferik").
to_return(:status => 204)
result = @client.publicize_membership("codeforamerica", "sferik")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -285,7 +285,7 @@
with(:name => "sferik").
to_return(:status => 204)
result = @client.unpublicize_membership("codeforamerica", "sferik")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -156,7 +156,7 @@
stub_delete("https://api.github.com/repos/pengwynn/octokit/pulls/comments/1907270").
to_return(:status => 204)
result = @client.delete_pull_request_comment("pengwynn/octokit", 1907270)
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -192,7 +192,7 @@
stub_get("https://api.github.com/repos/pengwynn/octokit/pulls/67/merge").
to_return(:status => 204)
merged = @client.pull_merged?("pengwynn/octokit", 67)
- expect(merged).to be_true
+ expect(merged).to eq(true)
end
end
@@ -70,7 +70,7 @@
stub_delete("/repos/octocat/Hello-World/git/refs/heads/feature-a").
to_return(:status => 204)
result = @client.delete_ref("octocat/Hello-World", "heads/feature-a")
- expect(result).to be_true
+ expect(result).to eq(true)
end
end
@@ -144,7 +144,7 @@
stub_get("https://api.github.com/user/following/puls").
to_return(:status => 204, :body => "")
follows = @client.follows?("sferik", "puls")
- expect(follows).to be_true
+ expect(follows).to eq(true)
end
end
@@ -168,7 +168,7 @@
stub_put("https://api.github.com/user/following/dianakimball").
to_return(:status => 204, :body => "")
following = @client.follow("dianakimball")
- expect(following).to be_true
+ expect(following).to eq(true)
end
end
@@ -179,7 +179,7 @@
stub_delete("https://api.github.com/user/following/dogbrainz").
to_return(:status => 204, :body => "")
following = @client.unfollow("dogbrainz")
- expect(following).to be_true
+ expect(following).to eq(true)
end
end
@@ -192,7 +192,7 @@
stub_get("https://api.github.com/user/starred/sferik/rails_admin").
to_return(:status => 204, :body => "")
starred = @client.starred?("sferik", "rails_admin")
- expect(starred).to be_true
+ expect(starred).to eq(true)
end
end
@@ -321,7 +321,7 @@
stub_delete("https://api.github.com/user/keys/103205").
to_return(:status => 204, :body => "")
response = @client.remove_key(103205)
- expect(response).to be_true
+ expect(response).to eq(true)
end
end
@@ -355,7 +355,7 @@
stub_delete("https://api.github.com/user/emails?email=sferik@gmail.com").
to_return(:status => 204, :body => "")
response = @client.remove_email("sferik@gmail.com")
- expect(response).to be_true
+ expect(response).to eq(true)
end
end
@@ -40,7 +40,7 @@
{ 'X-RateLimit-Limit' => 5000, 'X-RateLimit-Remaining' => 5000})
client = Octokit::Client.new()
client.rate_limit
- expect(mw_evaluated).to be_true
+ expect(mw_evaluated).to eq(true)
end
View
@@ -8,7 +8,7 @@
describe ".respond_to?" do
it "is true if method exists" do
- expect(Octokit.respond_to?(:new, true)).to be_true
+ expect(Octokit.respond_to?(:new, true)).to eq(true)
end
end

0 comments on commit 3d5b160

Please sign in to comment.