Sha256: d03b85f53eb536ed0d0f6f120c6c7784994f3914f09c7e2acfd8b3ac78bce5b7
Contents?: true
Size: 1.64 KB
Versions: 1
Compression:
Stored size: 1.64 KB
Contents
require 'spec_helper' describe "should be_predicate" do before(:each) do portuguese_language({"matchers" => {"be" => "ser"}}) Spec::Matchers.register_all_matchers end it "should pass with be language translated" do atual = stub("atual", :feliz? => true) atual.should ser_feliz end it "should fail when actual returns false for :predicate?" do pending('verify rspec 1.3') atual = stub("atual", :feliz? => false) lambda { atual.should be_feliz }.should fail_with("expected feliz? to return true, got false") end it "should fail when actual returns false for :predicate?" do pending('verify rspec 1.3') atual = stub("atual", :feliz? => nil) lambda { atual.should be_feliz }.should fail_with("expected feliz? to return true, got nil") end it 'should be true for the new :predicate' do atual = true pending("SHOULD translate true, false, nil, empty for the default MATCHERS") atual.should ser_true end it 'should convert be word to english with two parameters' do be_to_english(:ser_feliz, 'ser|estar').should == :be_feliz end it "should convert be word to english" do be_to_english(:ser_feliz, :ser).should == :be_feliz end it "should keep the same word in english(don't break the rspec defaults)" do be_to_english(:be_include, :be).should == :be_include end it "should keep the same word for the non existing word" do be_to_english(:be_include, :ser).should == :be_include end it "should keep the same word for the nil be word" do be_to_english(:be_include, nil).should == :be_include end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-i18n-1.0.0 | spec/spec-i18n/matchers/be_spec.rb |