File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
# encoding: utf-8
2
2
require File . dirname ( __FILE__ ) + '/../spec_helper'
3
3
4
- describe IceCube ::Schedule , 'to_s' do
5
-
6
- before :each do
7
- I18n . locale = :ja
8
- end
9
-
10
- after :all do
11
- I18n . locale = :en
12
- end
4
+ describe IceCube ::Schedule , 'to_s' , locale : 'ja' do
13
5
14
6
it 'should represent its start time by default' do
15
7
t0 = Time . local ( 2013 , 2 , 14 )
Original file line number Diff line number Diff line change @@ -59,6 +59,13 @@ def Object.const_missing(sym)
59
59
end
60
60
end
61
61
62
+ config . around :each , locale : true do |example |
63
+ orig_locale = I18n . locale
64
+ I18n . locale = example . metadata [ :locale ]
65
+ example . run
66
+ I18n . locale = orig_locale
67
+ end
68
+
62
69
config . around :each , expect_warnings : true do |example |
63
70
capture_warnings do
64
71
example . run
You can’t perform that action at this time.
0 commit comments