diff options
| author | Marc Florisson | 2013-07-23 09:43:31 +0200 | 
|---|---|---|
| committer | Marc Florisson | 2013-07-23 09:43:31 +0200 | 
| commit | e40a44ffdb011bd1fae6d8e3960570f6222d3994 (patch) | |
| tree | 8e19b0f165934812fe3dc01f9296318ba8abfb7e /spec/exporters | |
| parent | 59f686b05bd0bd98fb10c39f19074e7261f75a76 (diff) | |
| download | chouette-core-e40a44ffdb011bd1fae6d8e3960570f6222d3994.tar.bz2 | |
fix models select to export
Diffstat (limited to 'spec/exporters')
| -rw-r--r-- | spec/exporters/chouette/kml/exporter_spec.rb | 21 | 
1 files changed, 12 insertions, 9 deletions
| diff --git a/spec/exporters/chouette/kml/exporter_spec.rb b/spec/exporters/chouette/kml/exporter_spec.rb index dd7c44327..a1d33613d 100644 --- a/spec/exporters/chouette/kml/exporter_spec.rb +++ b/spec/exporters/chouette/kml/exporter_spec.rb @@ -19,37 +19,40 @@ describe Chouette::Kml::Exporter do    let!(:line) { Factory(:line_with_stop_areas_having_parent) }    let!(:line2) { Factory(:line_with_stop_areas_having_parent) } -  describe "#export" do     -    before(:each) do  +  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"} )                    +      subject.export(zip_file_path, {:export_id => 1, :o => "line"} )        File.exists?(zip_file_path).should be_true +      ::Zip::ZipFile.open(zip_file_path) do |f| +        puts "f = #{f.inspect}" +      end        ::Zip::ZipFile.open(zip_file_path).size.should == 6      end      it "should return a zip file with 4 kml files" do -      subject.export(zip_file_path, {:export_id => 1, :o => "line", :id => "#{line.id}" } )   +      subject.export(zip_file_path, {:export_id => 1, :o => "line", :id => "#{line.id}" } )        File.exists?(zip_file_path).should be_true        ::Zip::ZipFile.open(zip_file_path).size.should == 4      end      it "should return a zip file with 6 kml files" do -      subject.export(zip_file_path, {:export_id => 1, :o => "line", :id => "#{line.id},#{line2.id}" } )   +      subject.export(zip_file_path, {:export_id => 1, :o => "line", :id => "#{line.id},#{line2.id}" } )        File.exists?(zip_file_path).should be_true        ::Zip::ZipFile.open(zip_file_path).size.should == 6      end      it "should return a zip file with 6 kml files" do -      subject.export(zip_file_path, {:export_id => 1, :o => "", :id => "" } )   +      subject.export(zip_file_path, {:export_id => 1, :o => "", :id => "" } )        File.exists?(zip_file_path).should be_true        ::Zip::ZipFile.open(zip_file_path).size.should == 6      end -     -  end -                               + +   end +  end | 
