Sha256: 573e69ed4b26a3734a5f307cff9e1dfa9c5bec5b7c8c09392bd9ab2bdc422073

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

shared_examples_for "A scope" do

  it 'responds to its own methods' do
    subject.respond_to?(:respond_to?).should be_true
    subject.respond_to?(:evaluate).should be_true
    subject.respond_to?(:__eval_binding).should be_true
  end

  it 'responds to needed kernel methods' do
    subject.respond_to?(:lambda).should be_true
  end

  it "responds to BasicObject's API" do
    subject.respond_to?(:instance_eval).should be_true
  end
  
  it 'does not respond to anything' do
    subject.respond_to?(:anything_else).should be_false
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/shared/a_scope.rb
alf-core-0.14.0 spec/shared/a_scope.rb
alf-core-0.13.1 spec/shared/a_scope.rb
alf-core-0.13.0 spec/shared/a_scope.rb