Sha256: 542fca974a24a56a34853072dc36cc64537ab93745c163a373837e0ff265641d

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 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" }

  it "should retrieve the repo" do
    retriever = described_class.new(url)
    assert File.exists?(retriever.path)

    retriever.discard_repo
    assert !File.exists?(retriever.path)
  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.exists?(@path)
    end
    assert !File.exists?(@path)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
repomen-0.1.0 test/repomen/retriever_test.rb