summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2018-08-14 15:02:29 -0500
committerRobert Speicher <rspeicher@gmail.com>2018-08-15 16:04:16 -0500
commitb9d086e9dbcbd238426b10069d621c5af0f87ac8 (patch)
tree9e5bfb46b4f99e8c92f78bf5257212a4b8de95ea
parent268d23de46525cc18b805f09bf3eb3a1aa6aa8b8 (diff)
downloadgitlab-shell-b9d086e9dbcbd238426b10069d621c5af0f87ac8.tar.gz
Remove usages of `its` in specs
-rw-r--r--spec/gitlab_net_spec.rb2
-rw-r--r--spec/gitlab_shell_spec.rb32
-rw-r--r--spec/httpunix_spec.rb9
3 files changed, 27 insertions, 16 deletions
diff --git a/spec/gitlab_net_spec.rb b/spec/gitlab_net_spec.rb
index c518d0b..9f7c462 100644
--- a/spec/gitlab_net_spec.rb
+++ b/spec/gitlab_net_spec.rb
@@ -381,7 +381,7 @@ describe GitlabNet, vcr: true do
allow(gitlab_net.send(:config)).to receive(:http_settings) { {'self_signed_cert' => true} }
end
- its(:verify_mode) { should eq(OpenSSL::SSL::VERIFY_NONE) }
+ it { expect(subject.verify_mode).to eq(OpenSSL::SSL::VERIFY_NONE) }
end
describe '#http_request_for' do
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb
index c9137d3..8b08f35 100644
--- a/spec/gitlab_shell_spec.rb
+++ b/spec/gitlab_shell_spec.rb
@@ -74,7 +74,7 @@ describe GitlabShell do
describe :initialize do
let(:ssh_cmd) { 'git-receive-pack' }
- its(:gl_id) { should == gl_id }
+ it { expect(subject.gl_id).to eq gl_id }
end
describe :parse_cmd do
@@ -86,8 +86,10 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args
end
- its(:repo_name) { should == 'gitlab-ci.git' }
- its(:command) { should == 'git-upload-pack' }
+ it 'has the correct attributes' do
+ expect(subject.repo_name).to eq 'gitlab-ci.git'
+ expect(subject.command).to eq 'git-upload-pack'
+ end
end
context 'namespace' do
@@ -98,8 +100,10 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args
end
- its(:repo_name) { should == 'dmitriy.zaporozhets/gitlab-ci.git' }
- its(:command) { should == 'git-upload-pack' }
+ it 'has the correct attributes' do
+ expect(subject.repo_name).to eq 'dmitriy.zaporozhets/gitlab-ci.git'
+ expect(subject.command).to eq 'git-upload-pack'
+ end
end
context 'with an invalid number of arguments' do
@@ -137,9 +141,11 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args
end
- its(:repo_name) { should == 'dzaporozhets/gitlab.git' }
- its(:command) { should == 'git-lfs-authenticate' }
- its(:git_access) { should == 'git-upload-pack' }
+ it 'has the correct attributes' do
+ expect(subject.repo_name).to eq 'dzaporozhets/gitlab.git'
+ expect(subject.command).to eq 'git-lfs-authenticate'
+ expect(subject.git_access).to eq 'git-upload-pack'
+ end
end
describe 'git-lfs old clients' do
@@ -150,9 +156,11 @@ describe GitlabShell do
subject.send :parse_cmd, ssh_args
end
- its(:repo_name) { should == 'dzaporozhets/gitlab.git' }
- its(:command) { should == 'git-lfs-authenticate' }
- its(:git_access) { should == 'git-upload-pack' }
+ it 'has the correct attributes' do
+ expect(subject.repo_name).to eq 'dzaporozhets/gitlab.git'
+ expect(subject.command).to eq 'git-lfs-authenticate'
+ expect(subject.git_access).to eq 'git-upload-pack'
+ end
end
end
@@ -446,7 +454,7 @@ describe GitlabShell do
context 'with a correct path' do
before { subject.exec(ssh_cmd) }
- its(:repo_path) { should == repo_path }
+ it { expect(subject.repo_path).to eq repo_path }
end
context "with a path that doesn't match an absolute path" do
diff --git a/spec/httpunix_spec.rb b/spec/httpunix_spec.rb
index 0a8eb06..719a855 100644
--- a/spec/httpunix_spec.rb
+++ b/spec/httpunix_spec.rb
@@ -7,9 +7,12 @@ describe URI::HTTPUNIX do
subject { uri }
it { is_expected.to be_an_instance_of(URI::HTTPUNIX) }
- its(:scheme) { should eq('http+unix') }
- its(:hostname) { should eq('/path/to/socket') }
- its(:path) { should eq('/img.jpg') }
+
+ it 'has the correct attributes' do
+ 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