describe "POST import" do
describe "handling CSV files" do
describe "to import products" do
before(:each) do
@import = Hotel.create! valid_attributes
@import.CSV.stub(:foreach).with("file_path", headers: true).and_return(data)
end
it "should process the csv file after save" do
@import.should_receive(:process_csv)
@import.save
end
it "should load the csv file" do
CSV.should_receive(:foreach)
@import.save
end
end
end
end