Fix warnings for rspec 3

This commit is contained in:
Arthur Neves 2015-04-25 11:47:20 -04:00
parent f84541b1ba
commit 8f0fb511c3
No known key found for this signature in database
GPG Key ID: 04A390FB1E433E17
3 changed files with 3 additions and 4 deletions

View File

@ -24,7 +24,6 @@ Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'shoulda'
# Requires supporting ruby files with custom matchers and macros, etc,

View File

@ -6,11 +6,11 @@ RSpec::Matchers.define :match_html do |expected|
a.eql? b
end
failure_message_for_should do |actual|
failure_message do |actual|
"after sanitizing for extra white space and compactness, expected:\n#{actual}\n to match:\n#{expected}"
end
failure_message_for_should_not do |actual|
failure_message_when_negated do |actual|
"after sanitizing for extra white space and compactness, expected:\n#{actual}\n not to match:\n#{expected}"
end

View File

@ -2,7 +2,7 @@ RSpec::Matchers.define :be_within_one_second_of do |expected_time|
match do |actual_time|
(actual_time - expected_time).abs < 1
end
failure_message_for_should do |actual_time|
failure_message do |actual_time|
"#{actual_time} is not within 1 second of #{expected_time}"
end
end