Sha256: 56696948b48328f11abc20981ba797ea94c980c06639747d890d2bf13ded2744
Contents?: true
Size: 744 Bytes
Versions: 2
Compression:
Stored size: 744 Bytes
Contents
require "#{File.dirname __FILE__}/../ruby_ext_spec_helper" require "ruby_ext/should" describe 'Assert' do it 'should! & should_not!' do lambda{should! :be_never_called}.should raise_error(/ever/) lambda{nil.should_not! :be_nil}.should raise_error(/nil/) 1.should_not! :be_nil 1.should! :==, 1 lambda{1.should! :==, 2}.should raise_error(%r{==}) 1.should! :be_in, [1, 2] "".should! :be_a, String String.should! :be, String 1.should! :<, 2 end it 'should_be! & should_not_be!' do [].should_be! :empty [''].should_not_be! :empty lambda{[''].should_be! :empty}.should raise_error(/should be/) lambda{[].should_not_be! :empty}.should raise_error(/should not be/) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby-ext-0.4.1 | spec/ruby_ext/should_spec.rb |
ruby-ext-0.4.0 | spec/ruby_ext/should_spec.rb |