Sha256: a26a211cc86cc3b1ee67cb710a5a0d2b8075f112883b73fa4691278c2402a9ae
Contents?: true
Size: 847 Bytes
Versions: 1
Compression:
Stored size: 847 Bytes
Contents
require "spec_helper" describe "configuration" do describe "on_message_too_long" do it "should default to :raise_error" do Mblox.reset_configuration expect(Mblox.config.on_message_too_long).to eq(:raise_error) end it "should allow the value :truncate" do expect { Mblox.config.on_message_too_long = :truncate }.to_not raise_error end it "should allow the value :raise_error" do expect { Mblox.config.on_message_too_long = :raise_error }.to_not raise_error end it "should not allow other values and should remain in a valid state" do expect { Mblox.config.on_message_too_long = :do_nothing }.to raise_error(ArgumentError, "Mblox.config.on_message_too_long must be either :truncate or :raise_error") expect(Mblox.config.on_message_too_long).to eq(:raise_error) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mblox-0.0.2 | spec/configuration_spec.rb |