Sha256: 16f20d0a6da2ea5a3c5cdab09091e63e48e0a241430afa845210dcc133ceb086
Contents?: true
Size: 603 Bytes
Versions: 29
Compression:
Stored size: 603 Bytes
Contents
# -*- encoding : utf-8 -*- # Added from http://www.arctickiwi.com/blog/upgrading-to-rspec-2-with-ruby-on-rails-3 module RSpec::Rails module Matchers RSpec::Matchers.define :include_text do |text| match do |response_or_text| @content = response_or_text.respond_to?(:body) ? response_or_text.body : response_or_text @content.include?(text) end failure_message do |text| "expected '#{@content}' to contain '#{text}'" end failure_message_when_negated do |text| "expected #{@content} to not contain '#{text}'" end end end end
Version data entries
29 entries across 29 versions & 1 rubygems