File: method_condition_handler_spec.rb

package info (click to toggle)
yard 0.9.38-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,736 kB
  • sloc: ruby: 31,680; javascript: 7,658; makefile: 21
file content (15 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true
require File.dirname(__FILE__) + '/spec_helper'

RSpec.describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}MethodConditionHandler" do
  before(:all) { parse_file :method_condition_handler_001, __FILE__ }

  it "does not parse regular if blocks in methods" do
    expect(Registry.at('#b')).to be nil
  end

  it "parses if/unless blocks in the form X if COND" do
    expect(Registry.at('#c')).not_to be nil
    expect(Registry.at('#d')).not_to be nil
  end
end