Sha256: 546f8bc18008b17be426563d449ce6d0243c7e13a662558b18c66ebc9d3143ab
Contents?: true
Size: 933 Bytes
Versions: 2
Compression:
Stored size: 933 Bytes
Contents
require 'spec_helper' module Spec module Matchers describe 'the be_instance_of method' do before(:each) do @expected_matcher = { 'matchers' => { 'be_an_instance_of' => 'ser_instancia_de'} } portuguese_language(@expected_matcher) Spec::Matchers.register_all_matchers end it "register the be_an_instance_of method" do values = @expected_matcher['matchers']['be_an_instance_of'].split('|') values.each do |value_method| Object.instance_methods.should be_include(value_method) end end it "passes if actual is instance of expected class" do 5.should send(:ser_instancia_de, Fixnum) end it "fails if actual is instance of subclass of expected class" do lambda { 5.should send(:ser_instancia_de, Numeric) }.should raise_error end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-i18n-1.1.0 | spec/spec-i18n/matchers/be_instance_of_spec.rb |
rspec-i18n-1.0.0 | spec/spec-i18n/matchers/be_instance_of_spec.rb |