Sha256: 306036e8126cf720a2148b1e4ed493fbd032de5d9d3c52ce2f341efccbe681e3

Contents?: true

Size: 699 Bytes

Versions: 6

Compression:

Stored size: 699 Bytes

Contents

class g:Expectation

  def initialize(actual)
    self.actual = actual
  end

  defm load(matchers)
    matchers.load_defaults()

    match_tester = new g:MatchTester()
    match_items = matchers.get_match_items()

    for match_item in match_items
      func_name = "g:Expectation_#{match_item.name}"
      matcher_func = <<EOS
function! #{func_name}(...) dict
  if a:0 == 0
    let expected = 'null'
  else
    let expected = a:1
  endif

  let matcher_name = '#{match_item.name}'
  let match_tester = g:MatchTesterConstructor()
  call match_tester.test_from_env(matcher_name, expected)
endfunction
EOS
      exec matcher_func

      self[match_item.name] = function(func_name)
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
speckle-0.2.0 lib/expectation.riml
speckle-0.1.31 lib/expectation.riml
speckle-0.1.30 lib/expectation.riml
speckle-0.1.29 lib/expectation.riml
speckle-0.1.28 lib/expectation.riml
speckle-0.1.27 lib/expectation.riml