Sha256: 0b02051d17df478371748d4feb9d357fe92bd1f71dcb36747c74ec1b9e718908

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper.rb'

context "should_be_a_kind_of" do
  specify "should fail when target is not specified class" do
    lambda do
      5.should_be_a_kind_of(String)
    end.should_fail_with "expected kind_of?(String) to return true, got false"
  end

  specify "should pass when target is of specified class" do
    lambda do
      5.should_be_a_kind_of(Fixnum)
    end.should_pass
  end

  specify "should pass when target is of subclass of specified class" do
    lambda do
      5.should_be_a_kind_of(Integer)
    end.should_pass
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
riess-0.0.8 vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_a_kind_of_spec.rb
rspec-0.8.0 spec/spec/expectations/should/should_be_a_kind_of_spec.rb
rspec-0.8.1 spec/spec/expectations/should/should_be_a_kind_of_spec.rb
rspec-0.8.2 spec/spec/expectations/should/should_be_a_kind_of_spec.rb