spec/har/archive_spec.rb in har-0.0.4 vs spec/har/archive_spec.rb in har-0.0.5

- old
+ new

@@ -10,9 +10,15 @@ it "can be created from a file" do Archive.from_file(har_path("browser-blocking-time")).should be_kind_of(Archive) end + it "can be created from an IO" do + File.open(har_path("browser-blocking-time"), "r") do |io| + Archive.from_file(io).should be_kind_of(Archive) + end + end + it "saves the archive URI if created from a file" do ar = Archive.from_file(har_path("browser-blocking-time")) ar.uri.should_not be_nil ar.uri.should include("browser-blocking-time") end