summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-11-22 18:03:58 +0100
committerJacob Vosmaer <jacob@gitlab.com>2017-11-22 18:03:58 +0100
commitcb084fcb178e23fd7f51bf22f491e32f47a7e8e2 (patch)
tree06ba4325d530410f0d3b37311012770c5808b71f
parentc18c61a49af70a18e7767f8d649ca2b1924689e2 (diff)
downloadgitlab-ce-git-user-encoding.tar.gz
rename matchergit-user-encoding
-rw-r--r--spec/lib/gitlab/git/user_spec.rb4
-rw-r--r--spec/support/matchers/be_a_binary_string.rb (renamed from spec/support/matchers/be_binary.rb)2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/git/user_spec.rb b/spec/lib/gitlab/git/user_spec.rb
index 1ceb99be11e..99d850e1df9 100644
--- a/spec/lib/gitlab/git/user_spec.rb
+++ b/spec/lib/gitlab/git/user_spec.rb
@@ -50,10 +50,10 @@ describe Gitlab::Git::User do
expect(subject.gl_username).to eq(username)
expect(subject.name).to eq(name.b)
- expect(subject.name).to be_binary
+ expect(subject.name).to be_a_binary_string
expect(subject.email).to eq(email.b)
- expect(subject.email).to be_binary
+ expect(subject.email).to be_a_binary_string
expect(subject.gl_id).to eq(gl_id)
end
diff --git a/spec/support/matchers/be_binary.rb b/spec/support/matchers/be_a_binary_string.rb
index c517d7370be..f041ae76167 100644
--- a/spec/support/matchers/be_binary.rb
+++ b/spec/support/matchers/be_a_binary_string.rb
@@ -1,4 +1,4 @@
-RSpec::Matchers.define :be_binary do |_|
+RSpec::Matchers.define :be_a_binary_string do |_|
match do |actual|
actual.is_a?(String) && actual.encoding == Encoding.find('ASCII-8BIT')
end