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

- old
+ new

@@ -17,13 +17,17 @@ ar.uri.should_not be_nil ar.uri.should include("browser-blocking-time") end it "creates a single archive by merging the given paths" do - ar = Archive.by_merging good_hars.first(2) + ar = Archive.by_merging [har_path("browser-blocking-time"), har_path("google.com")] ar.pages.size.should == 3 end + + it "raises ArgumentError if the given array is empty" do + lambda { Archive.by_merging [] }.should raise_error(ArgumentError) + end end context "fetching data" do let(:archive) { Archive.from_file har_path("browser-blocking-time") } @@ -130,6 +134,6 @@ out.string.should == json end end end # Archive -end # HAR \ No newline at end of file +end # HAR