Skip to content
Browse files

Pretty printing for "any" schemas

Change-Id: Iac4e673d0b6c7916294d5d99df082f01d515a0b3
  • Loading branch information...
1 parent 90b1fe7 commit 0e7afb327ac402ac45049e7497f68eaecbd10177 mpage committed
Showing with 8 additions and 0 deletions.
  1. +2 −0 lib/membrane/schema_parser.rb
  2. +6 −0 spec/schema_parser_spec.rb
View
2 lib/membrane/schema_parser.rb
@@ -53,6 +53,8 @@ def deparse(schema)
case schema
when Membrane::Schema::Value
schema.value.inspect
+ when Membrane::Schema::Any
+ "any"
else
schema.inspect
end
View
6 spec/schema_parser_spec.rb
@@ -11,6 +11,12 @@
Membrane::SchemaParser.deparse(schema).should == val.inspect
end
+
+ it "should return 'any' for instance of Membrane::Schema::Any" do
+ schema = Membrane::Schema::Any.new
+
+ Membrane::SchemaParser.deparse(schema).should == "any"
+ end
end
describe "#parse" do

0 comments on commit 0e7afb3

Please sign in to comment.
Something went wrong with that request. Please try again.