Sha256: 9cd2954a34d5aabe1ad60e5e8bdb4c0b2509a41b73963cba237ed60e67b35abf

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'
module Alf
  module Support
    describe Scope, 'respond_to?' do

      context 'on an empty Scope' do
        subject{ Scope.new }
        it_behaves_like "A scope"
      end

      context 'on a Scope that has helpers' do
        subject{ Scope.new [ HelpersInScope ] }

        it_behaves_like "A scope"

        it "responds to helpers' methods" do
          subject.respond_to?(:world).should be_true
        end
      end

      context 'on a Scope that has a parent scope' do
        subject{ Scope.new [ ], Scope.new([ HelpersInScope ]) }

        it_behaves_like "A scope"

        it "responds to parent scope methods" do
          subject.respond_to?(:world).should be_true
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-support/scope/test_respond_to.rb
alf-core-0.14.0 spec/unit/alf-support/scope/test_respond_to.rb
alf-core-0.13.1 spec/unit/alf-support/scope/test_respond_to.rb
alf-core-0.13.0 spec/unit/alf-support/scope/test_respond_to.rb