diff options
Diffstat (limited to 'qa')
-rw-r--r-- | qa/spec/factory/resource/user_spec.rb | 8 | ||||
-rw-r--r-- | qa/spec/git/repository_spec.rb | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/qa/spec/factory/resource/user_spec.rb b/qa/spec/factory/resource/user_spec.rb index 820c506b715..d59ee24c758 100644 --- a/qa/spec/factory/resource/user_spec.rb +++ b/qa/spec/factory/resource/user_spec.rb @@ -2,7 +2,7 @@ describe QA::Resource::User do describe "#fabricate_via_api!" do - Response = Struct.new(:code, :body) + response = Struct.new(:code, :body) it 'fetches an existing user' do existing_users = [ @@ -13,8 +13,8 @@ describe QA::Resource::User do web_url: '' } ] - users_response = Response.new('200', JSON.dump(existing_users)) - single_user_response = Response.new('200', JSON.dump(existing_users.first)) + users_response = response.new('200', JSON.dump(existing_users)) + single_user_response = response.new('200', JSON.dump(existing_users.first)) expect(subject).to receive(:api_get_from).with("/users?username=name").and_return(users_response) expect(subject).to receive(:api_get_from).with("/users/0").and_return(single_user_response) @@ -26,7 +26,7 @@ describe QA::Resource::User do end it 'tries to create a user if it does not exist' do - expect(subject).to receive(:api_get_from).with("/users?username=foo").and_return(Response.new('200', '[]')) + expect(subject).to receive(:api_get_from).with("/users?username=foo").and_return(response.new('200', '[]')) expect(subject).to receive(:api_post).and_return({ web_url: '' }) subject.username = 'foo' diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb index 6cca9f55e11..0559fabbfd5 100644 --- a/qa/spec/git/repository_spec.rb +++ b/qa/spec/git/repository_spec.rb @@ -69,20 +69,20 @@ describe QA::Git::Repository do end describe '#fetch_supported_git_protocol' do - Result = Struct.new(:response) + result = Struct.new(:response) it "reports the detected version" do - expect(repository).to receive(:run).and_return(Result.new("packet: git< version 2")) + expect(repository).to receive(:run).and_return(result.new("packet: git< version 2")) expect(repository.fetch_supported_git_protocol).to eq('2') end it 'reports unknown if version is unknown' do - expect(repository).to receive(:run).and_return(Result.new("packet: git< version -1")) + expect(repository).to receive(:run).and_return(result.new("packet: git< version -1")) expect(repository.fetch_supported_git_protocol).to eq('unknown') end it 'reports unknown if content does not identify a version' do - expect(repository).to receive(:run).and_return(Result.new("foo")) + expect(repository).to receive(:run).and_return(result.new("foo")) expect(repository.fetch_supported_git_protocol).to eq('unknown') end end |