diff options
| -rw-r--r-- | config/locales/exports.yml | 4 | ||||
| -rw-r--r-- | spec/exporters/chouette/kml/exporter_spec.rb | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/config/locales/exports.yml b/config/locales/exports.yml index 41b3d891e..688d5ddb6 100644 --- a/config/locales/exports.yml +++ b/config/locales/exports.yml @@ -23,7 +23,7 @@ en: completed: "Completed export" failed: "Failed export" undefined: "%{key} undefined" - EXPORT: %{0} Export + EXPORT: "%{0} Export" EXPORTED_LINE: "Line %{0} (%{1}) exported" EMPTY_LINE: "Line without valid vehicle journey : not exported" EXPORT_ERROR: "Error durring export" @@ -178,4 +178,4 @@ fr: full_message: "Message" formtastic: hints: - time_zone: "selon le codage TZ (http://fr.wikipedia.org/wiki/Tz_database)"
\ No newline at end of file + time_zone: "selon le codage TZ (http://fr.wikipedia.org/wiki/Tz_database)" diff --git a/spec/exporters/chouette/kml/exporter_spec.rb b/spec/exporters/chouette/kml/exporter_spec.rb index 2a733e0a4..53e485cd7 100644 --- a/spec/exporters/chouette/kml/exporter_spec.rb +++ b/spec/exporters/chouette/kml/exporter_spec.rb @@ -12,11 +12,17 @@ describe Chouette::Kml::Exporter do subject { Chouette::Kml::Exporter.new(first_referential) } - let(:zip_file_path) { "#{Rails.root}/tmp/exports/test.zip" } + let(:tmp_path) { File.join( Rails.root, "tmp")} + let(:exports_path) { File.join( tmp_path, "exports")} + let(:zip_file_path) { File.join( exports_path, "test.zip")} let!(:line) { Factory(:line_with_stop_areas_having_parent) } let!(:line2) { Factory(:line_with_stop_areas_having_parent) } describe "#export" do + before(:each) do + Dir.mkdir( tmp_path) unless File.directory?( tmp_path) + Dir.mkdir( exports_path) unless File.directory?( exports_path) + end it "should return a zip file with nothing inside with no objects in arguments" do subject.export(zip_file_path, {:export_id => 1, :o => "line"} ) |
