Skip to content

Commit

Permalink
Spec: Add a minimal spec file for SourceCode
Browse files Browse the repository at this point in the history
  • Loading branch information
neomilium committed Apr 27, 2021
1 parent c384448 commit f760a74
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions spec/unit/modulesync/source_code_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'spec_helper'

describe ModuleSync::SourceCode do
before do
options = ModuleSync.config_defaults.merge({
git_base: 'file:///tmp/dummy',
})
ModuleSync.instance_variable_set '@options', options
end

subject do
ModuleSync::SourceCode.new('namespace/name', nil)
end

it 'has a repository namespace sets to "namespace"' do
expect(subject.repository_namespace).to eq 'namespace'
end

it 'has a repository name sets to "name"' do
expect(subject.repository_name).to eq 'name'
end
end

0 comments on commit f760a74

Please sign in to comment.