Sha256: e6b8da7fd2e6f1af61264f05bcb78c99e5947a3631ff353cdeaa23d0f33514bc
Contents?: true
Size: 719 Bytes
Versions: 2
Compression:
Stored size: 719 Bytes
Contents
require 'spec_helper' describe "should satisfy { block }" do before(:each) do @expected_matcher = { 'matchers' => { 'satisfy' => 'satisfazer'} } portuguese_language(@expected_matcher) Spec::Matchers.register_all_matchers end it 'should trasnlate the satisfy matcher' do values = @expected_matcher['matchers']['satisfy'].split('|') values.each do |value_method| Object.instance_methods.should be_include(value_method) end end it "should pass if block returns true" do true.should satisfazer { |val| val } true.should satisfazer do |val| val end end it "should fail if block returns false" do false.should_not satisfazer { |val| val } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-i18n-1.1.0 | spec/spec-i18n/matchers/satisfy_spec.rb |
rspec-i18n-1.0.0 | spec/spec-i18n/matchers/satisfy_spec.rb |