Skip to content

Instantly share code, notes, and snippets.

@sue445
Created March 8, 2013 08:28
Show Gist options
  • Save sue445/5114994 to your computer and use it in GitHub Desktop.
Save sue445/5114994 to your computer and use it in GitHub Desktop.
string matcher using between be_include and include
# -*- coding: utf-8 -*-
require 'spec_helper'
describe String do
it "match with be_include" do
"cure peace".should be_include "azatoi"
=begin
error message
1) String match with be_include
Failure/Error: "cure peace".should be_include "azatoi"
expected include?("azatoi") to return true, got false
# ./spec/workers/string_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
=end
end
it "match with include" do
"cure peace".should include "azatoi"
=begin
error message
2) String match with include
Failure/Error: "cure peace".should include "azatoi"
expected "cure peace" to include "azatoi"
# ./spec/workers/string_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
=end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment