Sha256: ec552cb92f067eb390073f6be43fb7e7e0a3a61231198f95d106641c60f5e7ab

Contents?: true

Size: 1.35 KB

Versions: 30

Compression:

Stored size: 1.35 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')

describe ::Inch::CodeObject::Proxy do
  before do
    @codebase = test_codebase(:ruby, :code_examples)
    @objects = @codebase.objects
  end

  def test_inspect_gives_original_name
    m = @objects.find('Foo::Bar#method_with_code_example')
    assert_match(/Foo::Bar#method_with_code_example/, m.inspect)
  end

  def test_grade_is_not_nil
    m = @objects.find('Foo::Bar#method_with_code_example')
    assert m.grade
  end

  def test_method_with_code_example
    m = @objects.find('Foo::Bar#method_with_code_example')
    assert m.has_code_example?
  end

  def test_method_with_code_example2
    m = @objects.find('Foo::Bar#method_with_code_example2')
    assert m.has_code_example?
  end

  def test_method_with_code_examples
    m = @objects.find('Foo::Bar#method_with_one_example')
    assert m.has_code_example?
    refute m.has_multiple_code_examples?
  end

  def test_method_with_code_examples
    m = @objects.find('Foo::Bar#method_with_examples')
    assert m.has_multiple_code_examples?
  end

  def test_method_with_code_examples
    m = @objects.find('Foo::Bar#method_with_tagged_example')
    assert m.has_multiple_code_examples?
  end

  def test_method_with_code_examples
    m = @objects.find('Foo::Bar#method_with_2tagged_examples')
    assert m.has_multiple_code_examples?
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
inch-0.7.1 test/unit/code_object/proxy_test.rb
inch-0.7.0 test/unit/code_object/proxy_test.rb
inch-0.6.4 test/unit/code_object/proxy_test.rb
inch-0.6.3 test/unit/code_object/proxy_test.rb
inch-0.6.2 test/unit/code_object/proxy_test.rb
inch-0.6.1 test/unit/code_object/proxy_test.rb
inch-0.6.0 test/unit/code_object/proxy_test.rb
inch-0.6.0.rc6 test/unit/code_object/proxy_test.rb
inch-0.6.0.rc5 test/unit/code_object/proxy_test.rb
inch-0.6.0.rc4 test/unit/code_object/proxy_test.rb
inch-0.6.0.rc3 test/unit/code_object/proxy_test.rb
inch-0.6.0.rc2 test/unit/code_object/proxy_test.rb
inch-0.6.0.rc1 test/unit/code_object/proxy_test.rb
inch-0.5.10 test/unit/code_object/proxy_test.rb
inch-0.5.9 test/unit/code_object/proxy_test.rb
inch-0.5.8 test/unit/code_object/proxy_test.rb
inch-0.5.7 test/unit/code_object/proxy_test.rb
inch-0.5.6 test/unit/code_object/proxy_test.rb
inch-0.5.5 test/unit/code_object/proxy_test.rb
inch-0.5.4 test/unit/code_object/proxy_test.rb