Sha256: a85fe89b971964e8b67db440c771fde089288a10a762425fb404d831662c580c
Contents?: true
Size: 880 Bytes
Versions: 11
Compression:
Stored size: 880 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') describe ::Repomen::Retriever do let(:described_class) { ::Repomen::Retriever } let(:url) { "git@bitbucket.org:atlassian_tutorial/helloworld.git" } let(:incorrect_url) { "git@bitbucket.org:atlassian_tutorial/helloworld123.git" } it "should retrieve the repo" do retriever = described_class.new(url) assert retriever.retrieved? assert File.exist?(retriever.path) retriever.discard_repo assert !File.exist?(retriever.path) end it "should retrieve the repo" do retriever = described_class.new(incorrect_url) refute retriever.retrieved? end it "should retrieve the repo, yield to block and discard the repo" do @path = nil described_class.new(url) do |path| @path = path assert File.exist?(@path) end assert !File.exist?(@path) end end
Version data entries
11 entries across 11 versions & 1 rubygems