Sha256: 0575c79e1f341cf2a2da79d1bcb762e1cfb3fd34b707d97587c9dbc51b376ea9
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe Classification do #fixtures :classification_types #fixtures :all fixtures :classification_types it "引数無し" do lambda{Classification.import_from_tsv}.should raise_error(ArgumentError) end it "引数あり" do lambda{Classification.import_from_tsv("/no_file")}.should raise_error(Errno::ENOENT) end it "引数あり" do path = "#{Rails.root}/../../spec/fixtures/shtsv.tsv" Classification.import_from_tsv(path) r = Classification.all r.size.should == 4 r[0].classifiation_identifier = "292.784" r[1].classifiation_identifier = "253.04" r[2].classifiation_identifier = "253.05" r[3].classifiation_identifier = "253.06" end end # == Schema Information # # Table name: classifications # # id :integer not null, primary key # parent_id :integer # category :string(255) not null # note :text # classification_type_id :integer not null # created_at :datetime not null # updated_at :datetime not null # lft :integer # rgt :integer # manifestation_id :integer #
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enju_trunk_subject-1.0.4 | spec/models/classification_spec.rb |