Commit b9d086e9 authored by Robert Speicher's avatar Robert Speicher

Remove usages of `its` in specs

parent 268d23de
...@@ -381,7 +381,7 @@ describe GitlabNet, vcr: true do ...@@ -381,7 +381,7 @@ describe GitlabNet, vcr: true do
allow(gitlab_net.send(:config)).to receive(:http_settings) { {'self_signed_cert' => true} } allow(gitlab_net.send(:config)).to receive(:http_settings) { {'self_signed_cert' => true} }
end end
its(:verify_mode) { should eq(OpenSSL::SSL::VERIFY_NONE) } it { expect(subject.verify_mode).to eq(OpenSSL::SSL::VERIFY_NONE) }
end end
describe '#http_request_for' do describe '#http_request_for' do
......
...@@ -74,7 +74,7 @@ describe GitlabShell do ...@@ -74,7 +74,7 @@ describe GitlabShell do
describe :initialize do describe :initialize do
let(:ssh_cmd) { 'git-receive-pack' } let(:ssh_cmd) { 'git-receive-pack' }
its(:gl_id) { should == gl_id } it { expect(subject.gl_id).to eq gl_id }
end end
describe :parse_cmd do describe :parse_cmd do
...@@ -86,8 +86,10 @@ describe GitlabShell do ...@@ -86,8 +86,10 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args subject.send :parse_cmd, ssh_args
end end
its(:repo_name) { should == 'gitlab-ci.git' } it 'has the correct attributes' do
its(:command) { should == 'git-upload-pack' } expect(subject.repo_name).to eq 'gitlab-ci.git'
expect(subject.command).to eq 'git-upload-pack'
end
end end
context 'namespace' do context 'namespace' do
...@@ -98,8 +100,10 @@ describe GitlabShell do ...@@ -98,8 +100,10 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args subject.send :parse_cmd, ssh_args
end end
its(:repo_name) { should == 'dmitriy.zaporozhets/gitlab-ci.git' } it 'has the correct attributes' do
its(:command) { should == 'git-upload-pack' } expect(subject.repo_name).to eq 'dmitriy.zaporozhets/gitlab-ci.git'
expect(subject.command).to eq 'git-upload-pack'
end
end end
context 'with an invalid number of arguments' do context 'with an invalid number of arguments' do
...@@ -137,9 +141,11 @@ describe GitlabShell do ...@@ -137,9 +141,11 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args subject.send :parse_cmd, ssh_args
end end
its(:repo_name) { should == 'dzaporozhets/gitlab.git' } it 'has the correct attributes' do
its(:command) { should == 'git-lfs-authenticate' } expect(subject.repo_name).to eq 'dzaporozhets/gitlab.git'
its(:git_access) { should == 'git-upload-pack' } expect(subject.command).to eq 'git-lfs-authenticate'
expect(subject.git_access).to eq 'git-upload-pack'
end
end end
describe 'git-lfs old clients' do describe 'git-lfs old clients' do
...@@ -150,9 +156,11 @@ describe GitlabShell do ...@@ -150,9 +156,11 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args subject.send :parse_cmd, ssh_args
end end
its(:repo_name) { should == 'dzaporozhets/gitlab.git' } it 'has the correct attributes' do
its(:command) { should == 'git-lfs-authenticate' } expect(subject.repo_name).to eq 'dzaporozhets/gitlab.git'
its(:git_access) { should == 'git-upload-pack' } expect(subject.command).to eq 'git-lfs-authenticate'
expect(subject.git_access).to eq 'git-upload-pack'
end
end end
end end
...@@ -446,7 +454,7 @@ describe GitlabShell do ...@@ -446,7 +454,7 @@ describe GitlabShell do
context 'with a correct path' do context 'with a correct path' do
before { subject.exec(ssh_cmd) } before { subject.exec(ssh_cmd) }
its(:repo_path) { should == repo_path } it { expect(subject.repo_path).to eq repo_path }
end end
context "with a path that doesn't match an absolute path" do context "with a path that doesn't match an absolute path" do
......
...@@ -7,9 +7,12 @@ describe URI::HTTPUNIX do ...@@ -7,9 +7,12 @@ describe URI::HTTPUNIX do
subject { uri } subject { uri }
it { is_expected.to be_an_instance_of(URI::HTTPUNIX) } it { is_expected.to be_an_instance_of(URI::HTTPUNIX) }
its(:scheme) { should eq('http+unix') }
its(:hostname) { should eq('/path/to/socket') } it 'has the correct attributes' do
its(:path) { should eq('/img.jpg') } expect(subject.scheme).to eq('http+unix')
expect(subject.hostname).to eq('/path/to/socket')
expect(subject.path).to eq('/img.jpg')
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment