spec/eprime_reader_spec.rb in optimus-ep-0.6.0 vs spec/eprime_reader_spec.rb in optimus-ep-0.6.5
- old
+ new
@@ -38,11 +38,11 @@
}.should_not raise_error
end
it "should detect log files" do
@reader.input = (@file)
- @reader.type.should == :log
+ @reader.type.should == Eprime::Reader::LogfileParser
end
it "should return the Eprime::Reader::LogfileParser" do
@reader.input = @file
@reader.parser.should be_an_instance_of(Eprime::Reader::LogfileParser)
@@ -70,11 +70,11 @@
@file = File.open(EXCEL_FILE)
end
it "should detect excel csv files" do
@reader.input = @file
- @reader.type.should == :excel
+ @reader.type.should == Eprime::Reader::ExcelParser
end
it "should resutn the Eprime::Reader::ExcelParser" do
@reader.input = @file
@reader.parser.should be_an_instance_of(Eprime::Reader::ExcelParser)
@@ -94,11 +94,11 @@
@file = File.open(EPRIME_FILE)
end
it "should detect eprime csv files" do
@reader.input = @file
- @reader.type.should == :eprime
+ @reader.type.should == Eprime::Reader::EprimetabParser
end
it "should return the Eprime::Reader::EprimetabParser" do
@reader.input = @file
@reader.parser.should be_an_instance_of(Eprime::Reader::EprimetabParser)
@@ -107,9 +107,21 @@
it "should make a non-empty Eprime::Data object" do
@reader.input = @file
data = @reader.eprime_data
data.length.should > 0
data.columns.sort.should == SORTED_COLUMNS
+ end
+ end
+
+ describe "with raw tsv files" do
+ before :each do
+ @file = File.open(RAW_TSV_FILE)
+ end
+
+
+ it "should detect tsv files" do
+ @reader.input = @file
+ @reader.type.should == Eprime::Reader::RawTabParser
end
end
end
\ No newline at end of file