Sha256: 0fadd12195222e1a3eb37a60c9a756dd65575f2e3c8c72b972890ce0fd2032a3
Contents?: true
Size: 1.48 KB
Versions: 7
Compression:
Stored size: 1.48 KB
Contents
require 'autoproj/test' require 'fakefs/safe' describe Autoproj::VCSDefinition do describe ".vcs_definition_to_hash" do before do FakeFS.activate! end after do FakeFS.deactivate! FakeFS::FileSystem.clear end it "interprets plain strings as local directories" do FileUtils.mkdir_p '/test' vcs = Autoproj::VCSDefinition.from_raw('/test') assert vcs.local? assert_equal '/test', vcs.url end it "interprets the type:url shortcut" do vcs = Autoproj::VCSDefinition.from_raw('git:git@github.com') assert_equal 'git', vcs.type assert_equal 'git@github.com', vcs.url end it "normalizes the standard format" do vcs = Autoproj::VCSDefinition.from_raw(Hash['type' => 'git', 'url' => 'u', 'branch' => 'b']) assert_equal 'git', vcs.type assert_equal 'u', vcs.url assert_equal 'b', vcs.options[:branch] end end describe "#create_autobuild_importer" do it "does not create an importer if type is none" do vcs = Autoproj::VCSDefinition.from_raw(type: 'none', url: nil) assert !vcs.create_autobuild_importer end it "does not create an importer if type is local" do vcs = Autoproj::VCSDefinition.from_raw(type: 'local', url: '/test') assert !vcs.create_autobuild_importer end end end
Version data entries
7 entries across 7 versions & 1 rubygems