Commit 90fc2759 authored by Erick Banks's avatar Erick Banks

Use `let` syntax

parent db8740c0
...@@ -3,14 +3,16 @@ ...@@ -3,14 +3,16 @@
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'Git clone over HTTP', :ldap_no_tls do describe 'Git clone over HTTP', :ldap_no_tls do
before(:all) do let(:project) do
@project = Resource::Project.fabricate_via_api! do |scenario| Resource::Project.fabricate_via_api! do |scenario|
scenario.name = 'project-with-code' scenario.name = 'project-with-code'
scenario.description = 'project for git clone tests' scenario.description = 'project for git clone tests'
end end
end
before do
Git::Repository.perform do |repository| Git::Repository.perform do |repository|
repository.uri = @project.repository_http_location.uri repository.uri = project.repository_http_location.uri
repository.use_default_credentials repository.use_default_credentials
repository.act do repository.act do
...@@ -21,12 +23,12 @@ module QA ...@@ -21,12 +23,12 @@ module QA
push_changes push_changes
end end
end end
@project.wait_for_push_new_branch project.wait_for_push_new_branch
end end
it 'user performs a deep clone' do it 'user performs a deep clone' do
Git::Repository.perform do |repository| Git::Repository.perform do |repository|
repository.uri = @project.repository_http_location.uri repository.uri = project.repository_http_location.uri
repository.use_default_credentials repository.use_default_credentials
repository.clone repository.clone
...@@ -37,7 +39,7 @@ module QA ...@@ -37,7 +39,7 @@ module QA
it 'user performs a shallow clone' do it 'user performs a shallow clone' do
Git::Repository.perform do |repository| Git::Repository.perform do |repository|
repository.uri = @project.repository_http_location.uri repository.uri = project.repository_http_location.uri
repository.use_default_credentials repository.use_default_credentials
repository.shallow_clone repository.shallow_clone
......
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