0
這是我的規格:如何合併rspec中的匹配器?
it "should convert doc successfully" do
@response = SharpOffice::Office.process(File.expand_path("spec/fixture/test.doc"))
@response[:status].should == 'ok'
File.exist?(@response[:pdf_path]).should be_true
File.exist?(@response[:swf_path]).should be_true
File.exist?(@response[:cover_path]).should be_true
end
it "should convert ppt successfully" do
@response = SharpOffice::Office.process(File.expand_path("spec/fixture/test.ppt"))
@response[:status].should == 'ok'
File.exist?(@response[:pdf_path]).should be_true
File.exist?(@response[:swf_path]).should be_true
File.exist?(@response[:cover_path]).should be_true
end
it "should convert xls successfully" do
@response = SharpOffice::Office.process(File.expand_path("spec/fixture/test.xls"))
@response[:status].should == 'ok'
File.exist?(@response[:pdf_path]).should be_true
File.exist?(@response[:swf_path]).should be_true
File.exist?(@response[:cover_path]).should be_true
end
如何合併重複?謝謝