spec/har/viewer_spec.rb in har-0.0.1.dev vs spec/har/viewer_spec.rb in har-0.0.1

- old
+ new

@@ -2,15 +2,20 @@ module HAR describe Viewer do context "creating" do - it "validates the given HARs" do - lambda { Viewer.new(all_hars) }.should raise_error(ValidationError) + it "validates the given HARs if asked to" do + lambda { Viewer.new(["--validate", *all_hars]) }.should raise_error(ValidationError) end it "has a merged archive" do Viewer.new(good_hars).har.should be_kind_of(Archive) + end + + it "parses options" do + v = Viewer.new(["-p", "1234", *good_hars]) + v.options[:port].should == 1234 end end end end \ No newline at end of file