Sha256: 395ed6a4abd4abf59df181a804fd91d45a1421d9c7e1200ef28fe6a700ebe353
Contents?: true
Size: 1.23 KB
Versions: 26
Compression:
Stored size: 1.23 KB
Contents
require 'spec_helper' require 'cucumber/wire_support/wire_language' module Cucumber module WireSupport describe WireException do before(:each) do @config = Configuration.new('host' => 'localhost', 'port' => 54321) end def exception WireException.new(@data, @config) end describe "with just a message" do before(:each) do @data = {'message' => 'foo'} end it "should #to_s as expected" do exception.to_s.should == "foo" end end describe "with a message and an exception" do before(:each) do @data = {'message' => 'foo', 'exception' => 'Bar'} end it "should #to_s as expected" do exception.to_s.should == "foo" end it "#class.to_s should return the name of the exception" do exception.class.to_s.should == 'Bar from localhost:54321' end end describe "with a custom backtrace" do before(:each) do @data = {'message' => 'foo', 'backtrace' => ['foo', 'bar', 'baz']} end it "#backrace should return the custom backtrace" do exception.backtrace.should == ['foo', 'bar', 'baz'] end end end end end
Version data entries
26 entries across 24 versions & 2 rubygems