diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 557555aee58d4690f6fbee86d1a60c7e880ed496..caf6c73ee066536790c090002118654fe016e839 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -74,7 +74,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
   end
 
   step 'I fill the new file name with an illegal name' do
-    fill_in :file_name, with: '.git'
+    fill_in :file_name, with: 'Spaces Not Allowed'
   end
 
   step 'I fill the commit message' do
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb
index 1db9f15b790f2ffd815b5202b46c7f0e06810f81..727884c41c5565dc215e322b147fe6cc38932cb5 100644
--- a/spec/lib/gitlab/regex_spec.rb
+++ b/spec/lib/gitlab/regex_spec.rb
@@ -1,14 +1,14 @@
 require 'spec_helper'
 
 describe Gitlab::Regex do
-  describe 'path regex' do
-    it { expect('gitlab-ce').to match(Gitlab::Regex.path_regex) }
-    it { expect('gitlab_git').to match(Gitlab::Regex.path_regex) }
-    it { expect('_underscore.js').to match(Gitlab::Regex.path_regex) }
-    it { expect('100px.com').to match(Gitlab::Regex.path_regex) }
-    it { expect('?gitlab').not_to match(Gitlab::Regex.path_regex) }
-    it { expect('git lab').not_to match(Gitlab::Regex.path_regex) }
-    it { expect('gitlab.git').not_to match(Gitlab::Regex.path_regex) }
+  describe 'project path regex' do
+    it { expect('gitlab-ce').to match(Gitlab::Regex.project_path_regex) }
+    it { expect('gitlab_git').to match(Gitlab::Regex.project_path_regex) }
+    it { expect('_underscore.js').to match(Gitlab::Regex.project_path_regex) }
+    it { expect('100px.com').to match(Gitlab::Regex.project_path_regex) }
+    it { expect('?gitlab').not_to match(Gitlab::Regex.project_path_regex) }
+    it { expect('git lab').not_to match(Gitlab::Regex.project_path_regex) }
+    it { expect('gitlab.git').not_to match(Gitlab::Regex.project_path_regex) }
   end
 
   describe 'project name regex' do
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 9868b8694cb23a4786064ccc64fc230bc0f4434c..b713f1fe898875303d6e6bd2387e39aecf4bdfb5 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -252,7 +252,7 @@ describe API::API, api: true  do
       expect(json_response['message']['path']).to eq([
         'can\'t be blank',
         'is too short (minimum is 0 characters)',
-        Gitlab::Regex.send(:default_regex_message)
+        Gitlab::Regex.send(:project_path_regex_message)
       ])
     end
 
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 081400cdedda826ca3c1d1b69c6a861493a3a992..e6d5545f81284d501473c97ac9be8bba0c8639a6 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -140,7 +140,7 @@ describe API::API, api: true  do
       expect(json_response['message']['projects_limit']).
           to eq(['must be greater than or equal to 0'])
       expect(json_response['message']['username']).
-          to eq([Gitlab::Regex.send(:default_regex_message)])
+          to eq([Gitlab::Regex.send(:namespace_regex_message)])
     end
 
     it "shouldn't available for non admin users" do
@@ -266,7 +266,7 @@ describe API::API, api: true  do
       expect(json_response['message']['projects_limit']).
           to eq(['must be greater than or equal to 0'])
       expect(json_response['message']['username']).
-          to eq([Gitlab::Regex.send(:default_regex_message)])
+          to eq([Gitlab::Regex.send(:namespace_regex_message)])
     end
 
     context "with existing user" do