diff options
| author | Alban Peignier | 2012-06-06 19:11:25 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2012-06-06 19:11:25 +0200 | 
| commit | ecc2c32f1c42ca5b22d96924c6371c23b12723ac (patch) | |
| tree | defb322c7075b9bbf114afed1bdd44f3b4f3fa25 /spec/models/import_spec.rb | |
| parent | 3a2bc072996a61047ba1d829101b4dd8bfda336c (diff) | |
| download | chouette-core-ecc2c32f1c42ca5b22d96924c6371c23b12723ac.tar.bz2 | |
Add view to manage several Import implementations
Diffstat (limited to 'spec/models/import_spec.rb')
| -rw-r--r-- | spec/models/import_spec.rb | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb index f0b76c15e..f0a66eb4d 100644 --- a/spec/models/import_spec.rb +++ b/spec/models/import_spec.rb @@ -42,4 +42,20 @@ describe Import do    end +  describe ".types" do +     +    it "should return available Import implementations" do +      Import.types.should =~ %w{NeptuneImport CsvImport} +    end + +  end + +  describe ".new" do +     +    it "should use type attribute to create a subclass" do +      Import.new(:type => "NeptuneImport").should be_an_instance_of(NeptuneImport) +    end + +  end +  end  | 
