spec/i18n_tasks_spec.rb in i18n-tasks-0.2.2 vs spec/i18n_tasks_spec.rb in i18n-tasks-0.2.3

- old
+ new

@@ -8,20 +8,20 @@ TestCodebase.rake_result('i18n:missing').should be_i18n_keys %w( en.used_but_missing.a en.relative.index.missing es.missing_in_es.a es.blank_in_es.a es.same_in_es.a en.missing_symbol_key en.missing_symbol.key_two en.missing_symbol.key_three ) - end.should =~ /Missing keys and translations \(8\)/ + end end end describe 'unused' do it 'detects unused' do TestCodebase.capture_stderr do out = TestCodebase.rake_result('i18n:unused') out.should be_i18n_keys %w(unused.a unused.numeric unused.plural) - end.should =~ /Unused i18n keys \(3\)/ + end end end describe 'normalize' do it 'moves keys to the corresponding files as per data.write' do @@ -29,9 +29,19 @@ File.exists?('config/locales/devise.en.yml').should be_false TestCodebase.rake_result('i18n:normalize') YAML.load_file('config/locales/devise.en.yml')['en']['devise']['a'].should == 'EN_TEXT' } end + end + + describe 'spreadsheet report' do + it 'saves' do + TestCodebase.in_test_app_dir { + TestCodebase.rake_result('i18n:spreadsheet_report') + File.should exist 'tmp/i18n-report.xlsx' + } + end + end describe 'fill:' do it 'add missing' do TestCodebase.in_test_app_dir { YAML.load_file('config/locales/en.yml')['en']['used_but_missing'].should be_nil }