spec/configuration_spec.rb in mblox-0.0.2 vs spec/configuration_spec.rb in mblox-0.0.3
- old
+ new
@@ -9,15 +9,19 @@
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 :split" do
+ expect { Mblox.config.on_message_too_long = :split }.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 = :do_nothing }.to raise_error(ArgumentError, "Mblox.config.on_message_too_long must be either :truncate, :split or :raise_error")
expect(Mblox.config.on_message_too_long).to eq(:raise_error)
end
end
end