Sha256: 7414ac70ba97b8ee56387ce3240b74c4ca157ccac98aada8826d9e9fa97e9344

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

require 'spec_helper'
require 'helpers/examples'

require 'yard-contextify/contextify_handler'
require 'yard-contextify/legacy/contextify_handler'

describe "ContextifyHandler" do
  include Helpers::Examples

  context "valid" do
    before(:all) do
      parse_file :simple_contextify
    end

    it "should register a Kernel method for the class" do
      yard('Kernel#simple_context').should be_instance_of(CodeObjects::MethodObject)
    end
  end

  context "invalid" do
    before(:all) do
      parse_file :bad_contextify
    end

    it "should not register a Kernel methods for variables" do
      yard('Kenrel#contextify').should be_nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yard-contextify-0.1.0 spec/contextify_handler_spec.rb