Sha256: dd2c71d700c82505a608e5647f66f02cc66ea03f4909c8bf3890511524e3f9e7
Contents?: true
Size: 745 Bytes
Versions: 22
Compression:
Stored size: 745 Bytes
Contents
require 'spec_helper' describe Errplane::BlackBox do before do begin 1/0 rescue Exception => e @exception = e end end describe ".new" do it "should create a new BlackBox" do black_box = Errplane::BlackBox.new end it "should accept an exception as a parameter" do black_box = Errplane::BlackBox.new(exception: @exception) black_box.should_not be_nil end end describe "#to_json" do it "should return a JSON string" do black_box = Errplane::BlackBox.new(exception: @exception) json = JSON.parse(black_box.to_json) json["message"].should == "divided by 0" json["time"].should_not be_nil json["backtrace"].should_not be_nil end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
errplane-0.0.2 | spec/unit/black_box_spec.rb |
errplane-0.0.1 | spec/unit/black_box_spec.rb |