Sha256: da5525caa84e567e9dab9db1bf7b3c6406b2b50a958a91fa184e6996fed6a80c

Contents?: true

Size: 335 Bytes

Versions: 4

Compression:

Stored size: 335 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

context "should =~" do
  specify "should pass when =~ operator returns non-nil" do
    "foo".should =~ /oo/
  end

  specify "should fail when =~ operator returns nil" do
    lambda do
      "fu".should =~ /oo/
    end.should_fail_with "expected =~ /oo/, got \"fu\""
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
riess-0.0.8 vendor/rspec-0.8.2/spec/spec/expectations/should/should_=~_spec.rb
rspec-0.8.1 spec/spec/expectations/should/should_=~_spec.rb
rspec-0.8.0 spec/spec/expectations/should/should_=~_spec.rb
rspec-0.8.2 spec/spec/expectations/should/should_=~_spec.rb