Skip to content

Commit

Permalink
Add spec for CLocale module
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Aug 8, 2018
1 parent 6642cc1 commit ca01a61
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/clocale_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'clocale'

RSpec.describe CLocale do
context 'module' do
%i(LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME).each do |const|
it "has #{const} constant" do
expect(subject).to be_const_defined const
end
end

it 'setlocale' do
expect { subject.setlocale(CLocale::LC_ALL, '') }.not_to raise_error
end
end
end

0 comments on commit ca01a61

Please # to comment.