Sha256: 137b1e96c01167a27233a45fc31f3478d574d2947176cd42e7cf2f7666987fb7
Contents?: true
Size: 458 Bytes
Versions: 14
Compression:
Stored size: 458 Bytes
Contents
RSpec::Matchers.define :enclose_scope do |expected_scope| chain(:under) do |scope| @external_scope = scope end match do |actual| @result = true dsl(@external_scope || [:config]) do |c| @result &= !c.send(:current_scope?, expected_scope) c.send(expected_scope, :foo) do @result &= c.send(:current_scope?, expected_scope) end @result &= !c.send(:current_scope?, expected_scope) end @result end end
Version data entries
14 entries across 14 versions & 1 rubygems