Sha256: c9687e5f302120dfb5cae628b253b49e04f32de6d86fc41c3d4f485d9ff39637

Contents?: true

Size: 568 Bytes

Versions: 4

Compression:

Stored size: 568 Bytes

Contents

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

context "should_match" do
  specify "should pass when objects match" do
    "hi aslak".should_match(/aslak/)
  end

  specify "should fail objects do not match" do
    lambda do
      "hi aslak".should_match(/steve/)
    end.should_fail
  end
end

context "should_not_match" do
  specify "should fail when objects match" do
    lambda do
      "hi aslak".should_not_match(/aslak/)
    end.should_fail
  end

  specify "should pass objects do not match" do
    "hi aslak".should_not_match(/steve/)
  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_match_spec.rb
rspec-0.8.0 spec/spec/expectations/should/should_match_spec.rb
rspec-0.8.1 spec/spec/expectations/should/should_match_spec.rb
rspec-0.8.2 spec/spec/expectations/should/should_match_spec.rb