Sha256: c294819e93031d8f48fb4e9c07d23edd9b4c30db9221680c67324eea1aef61c7

Contents?: true

Size: 294 Bytes

Versions: 5

Compression:

Stored size: 294 Bytes

Contents

module Spec

  class InstanceNegator < ShouldBase
  
    def initialize(target)
      @target = target
    end
    
    def of(expected_class)
      fail_with_message(default_message("should not be an instance of", expected_class)) if @target.instance_of? expected_class
    end
    
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rspec-0.5.12 lib/spec/api/helper/instance_negator.rb
rspec-0.5.15 lib/spec/api/helper/instance_negator.rb
rspec-0.5.13 lib/spec/api/helper/instance_negator.rb
rspec-0.5.14 lib/spec/api/helper/instance_negator.rb
rspec-0.5.16 lib/spec/api/helper/instance_negator.rb