Sha256: 3b52cb665cfc7ca025d068f9e87b3ddf5e9f314daac3598462217cd2ce53eb5a
Contents?: true
Size: 886 Bytes
Versions: 2
Compression:
Stored size: 886 Bytes
Contents
require 'spec_helper' module Spec module Matchers describe 'the be_instance_of method' do before(:each) do @keywords = { 'matchers' => { 'be_an_instance_of' => 'ser_instancia_de|ser_instancia'} } stub_language!("pt", @keywords) Spec::Matchers.register_all_matchers end it "register the be_an_instance_of method" do [:ser_instancia_de, :ser_instancia].each do |translated_matcher| methods.to_symbols.should include(translated_matcher) 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.2.1 | spec/spec-i18n/matchers/be_instance_of_spec.rb |
rspec-i18n-1.2.0 | spec/spec-i18n/matchers/be_instance_of_spec.rb |