Sha256: 0e3a28163f7989036245406b891d3e295b891ac95c10497da537b736552e35d8
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}ClassConditionHandler" do before(:all) { parse_file :class_condition_handler_001, __FILE__ } def verify_method(*names) names.each {|name| Registry.at("A##{name}").should_not be_nil } names.each {|name| Registry.at("A##{name}not").should be_nil } end it "should parse all unless blocks for complex conditions" do verify_method :g end it "should not parse conditionals inside methods" do verify_method :h end it "should only parse then block if condition is literal value `true`" do verify_method :p end it "should only parse then block if condition is literal integer != 0" do verify_method :o end it "should invert block to parse for literal condition if it's an unless block" do verify_method :e end it "should handle conditions such as 'defined? VALUE'" do verify_method :j, :k end it "should parse all if/elsif blocks for complex conditions" do verify_method :a, :b, :c, :d end it "should only parse else block if condition is literal value `false`" do verify_method :q end it "should only parse else block if condition is literal integer == 0" do verify_method :n end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yard-0.5.5 | spec/handlers/class_condition_handler_spec.rb |