diff options
| author | Michel Etienne | 2012-12-21 22:26:28 +0100 |
|---|---|---|
| committer | Michel Etienne | 2012-12-21 22:26:28 +0100 |
| commit | de09bb4efb4aa5a4c04ce24039c54f8ce2c1fdfe (patch) | |
| tree | c4f46fe449bf03a56dd2048003d52f48179b4cd6 /spec/models | |
| parent | 17152c4a3b29419a4468ea908c11e80c661dfcde (diff) | |
| download | chouette-core-de09bb4efb4aa5a4c04ce24039c54f8ce2c1fdfe.tar.bz2 | |
add gtfs import
Diffstat (limited to 'spec/models')
| -rw-r--r-- | spec/models/gtfs_import_spec.rb | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/spec/models/gtfs_import_spec.rb b/spec/models/gtfs_import_spec.rb new file mode 100644 index 000000000..f22a2d20d --- /dev/null +++ b/spec/models/gtfs_import_spec.rb @@ -0,0 +1,75 @@ +require 'spec_helper' + +describe GtfsImport do + + describe "#objectid_prefix" do + + it "should be included in options" do + subject.objectid_prefix = "dummy" + subject.options.should include "objectid_prefix" => "dummy" + end + + it "should be included in import_options" do + subject.objectid_prefix = "dummy" + subject.import_options.should include :objectid_prefix => "dummy" + end + + end + + describe "#max_distance_for_commercial" do + + it "should be included in options" do + subject.max_distance_for_commercial = 300 + subject.options.should include "max_distance_for_commercial" => 300 + end + + it "should be included in import_options" do + subject.max_distance_for_commercial = 300 + subject.import_options.should include :max_distance_for_commercial => 300 + end + + end + + describe "#max_distance_for_connection_link" do + + it "should be included in options" do + subject.max_distance_for_connection_link = 300 + subject.options.should include "max_distance_for_connection_link" => 300 + end + + it "should be included in import_options" do + subject.max_distance_for_connection_link = 300 + subject.import_options.should include :max_distance_for_connection_link => 300 + end + + end + + describe "#ignore_last_word" do + + it "should be included in options" do + subject.ignore_last_word = true + subject.options.should include "ignore_last_word" => true + end + + it "should be included in import_options" do + subject.ignore_last_word = true + subject.import_options.should include :ignore_last_word => true + end + + end + + describe "#ignore_end_chars" do + + it "should be included in options" do + subject.ignore_end_chars = 2 + subject.options.should include "ignore_end_chars" => 2 + end + + it "should be included in import_options" do + subject.ignore_end_chars = 2 + subject.import_options.should include :ignore_end_chars => 2 + end + + end + +end |
