Sha256: 140a634a5d030c3ae4665ee52e0b20d289e8be5c005b036ada3744fa17f56ef5
Contents?: true
Size: 876 Bytes
Versions: 17
Compression:
Stored size: 876 Bytes
Contents
require File.join(File.dirname(__FILE__),'../../spec_helper') describe IMW::Schemes::Remote::Base do end describe IMW::Schemes::Remote::RemoteFile do before do # skip modules or else it will automatically become HTML! @file = IMW.open('http://www.google.com', :skip_modules => ["Schemes::HTTP", "Formats::HTML"]) end describe 'with the file' do it "can read a remote file" do @file.read.size.should > 0 end it "can load the lines of a remote file" do data = @file.load data.size.should > 0 data.class.should == Array end it "can iterate over the lines of a remote file" do @file.load do |line| line.class.should == String break end end it "can map the lines of a remote file" do @file.map do |line| line[0..5] end.class.should == Array end end end
Version data entries
17 entries across 17 versions & 1 rubygems