spec/punchblock/command/reject_spec.rb in punchblock-1.2.0 vs spec/punchblock/command/reject_spec.rb in punchblock-1.3.0
- old
+ new
@@ -35,15 +35,21 @@
its(:reason) { should be == :busy }
its(:headers_hash) { should be == { :x_reason_internal => 'bad-skill' } }
end
describe "with the reason" do
- [:decline, :busy, :error].each do |reason|
+ [nil, :decline, :busy, :error].each do |reason|
describe reason do
subject { Reject.new :reason => reason }
its(:reason) { should be == reason }
end
+ end
+
+ describe "no reason" do
+ subject { Reject.new }
+
+ its(:reason) { should be_nil }
end
describe "blahblahblah" do
it "should raise an error" do
expect { Reject.new(:reason => :blahblahblah) }.to raise_error ArgumentError