Skip to content

Commit

Permalink
Improve UpdatesManager#add_repository test
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jun 16, 2016
1 parent badd03a commit a888182
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/updates_manager_test.rb
Expand Up @@ -23,9 +23,10 @@
end

context "when repository is added successfully" do
it "returns true" do
it "returns true and add the repository" do
allow(repo0).to receive(:fetch)
expect(manager.add_repository(uri)).to eq(true)
expect(manager.repositories).to eq([repo0])
end
end

Expand All @@ -34,6 +35,7 @@
allow(repo0).to receive(:fetch)
allow(repo0).to receive(:empty?).and_return(true)
expect(manager.add_repository(uri)).to eq(false)
expect(manager.repositories).to be_empty
end
end

Expand Down

0 comments on commit a888182

Please sign in to comment.