Sha256: a17a600e617b36f8b544af546397526e6f87a75f7fab4295b6b177b1e25a9ef5

Contents?: true

Size: 255 Bytes

Versions: 5

Compression:

Stored size: 255 Bytes

Contents

Spec::Matchers.define :assign do |ivar|
  match do |klass|
    check_assignment(klass,ivar)
  end
  description { "assign to the instance variable @#{ivar}" }
  def check_assignment(klass,ivar)
    klass.instance_variable_get("@#{ivar}") != nil
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
botfly-0.3.6 spec/support/custom_matchers.rb
botfly-0.3.5 spec/support/custom_matchers.rb
botfly-0.3.4 spec/support/custom_matchers.rb
botfly-0.3.3 spec/support/custom_matchers.rb
botfly-0.3.2 spec/support/custom_matchers.rb