diff options
-rw-r--r-- | spec/lib/gitlab/git/user_spec.rb | 4 | ||||
-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 |