Permalink
Browse files

failing spec

  • Loading branch information...
1 parent ed1e320 commit aa12924d353ab64562a4bb6a82ce8c395d8c7547 Daniël van de Burgt committed Jan 10, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 spec/response_spec.rb
View
@@ -0,0 +1,16 @@
+require 'spec_helper'
+
+describe "Optitron::Response" do
+ context "when validation fails" do
+ it "should output error messages" do
+ parser = Optitron.new do
+ cmd "foo" do
+ end
+ end
+
+ response = parser.parse([])
+ response.should_receive(:puts).with("Unknown command")
+ response.dispatch(nil)
+ end
+ end
+end

0 comments on commit aa12924

Please sign in to comment.