Fix warnings for rspec 3
This commit is contained in:
parent
f84541b1ba
commit
8f0fb511c3
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue