spec/templates/helpers/shared_signature_examples.rb in yard-0.5.8 vs spec/templates/helpers/shared_signature_examples.rb in yard-0.6.0

- old
+ new

@@ -56,9 +56,18 @@ # @return [Type, nil] def foo; end eof signature(Registry.at('#foo')).should == @results[:type_nil] end + + it "should show 'Type?' if return types are [Type, nil, nil] (extra nil)" do + YARD.parse_string <<-'eof' + # @return [Type, nil] + # @return [nil] + def foo; end + eof + signature(Registry.at('#foo')).should == @results[:type_nil] + end it "should show 'Type+' if return types are [Type, Array<Type>]" do YARD.parse_string <<-'eof' # @return [Type, <Type>] def foo; end