Skip to content

Commit 1090abc

Browse files
committed
KBP-139 #time 15m - fixed code
1 parent cbb1c0e commit 1090abc

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

spec/features/new_default_project_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,16 @@
161161
expect(locale_file).to match('number:')
162162

163163
expect(File).to exist(file_project_path('config/locales/email.tr.yml'))
164+
locale_file = content('config/locales/email.tr.yml')
165+
expect(locale_file).to match('email:')
166+
164167
expect(File).to exist(file_project_path('config/locales/models.tr.yml'))
168+
locale_file = content('config/locales/models.tr.yml')
169+
expect(locale_file).to match('activerecord:')
170+
165171
expect(File).to exist(file_project_path('config/locales/view.tr.yml'))
172+
locale_file = content('config/locales/view.tr.yml')
173+
expect(locale_file).to match('view:')
166174
end
167175

168176
it 'uses simple_form' do

spec/features/new_not_default_project_spec.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,18 @@
141141
expect(locale_file).to match('number:')
142142

143143
expect(File).to exist(file_project_path('config/locales/email.tr.yml'))
144+
locale_file = content('config/locales/email.tr.yml')
145+
expect(locale_file).to match('email:')
146+
144147
expect(File).to exist(file_project_path('config/locales/models.tr.yml'))
148+
locale_file = content('config/locales/models.tr.yml')
149+
expect(locale_file).to match('activerecord:')
150+
145151
expect(File).to exist(file_project_path('config/locales/view.tr.yml'))
152+
locale_file = content('config/locales/view.tr.yml')
153+
expect(locale_file).to match('view:')
146154
end
147155

148-
149156
it 'uses recipient_interceptor' do
150157
gemfile_file = content('Gemfile')
151158
expect(gemfile_file).to match(/^gem 'recipient_interceptor'/)

templates/config/locales/email.tr.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tr:
3+
email:
4+
salut: 'Merhaba %{user};'
5+
hello: 'Merhaba;'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tr:
2+
activerecord:

templates/config/locales/view.tr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tr:
2+
view:

0 commit comments

Comments
 (0)