Class: CarrierWave::Test::Matchers::BeIdenticalTo
- Inherits:
-
Object
- Object
- CarrierWave::Test::Matchers::BeIdenticalTo
- Defined in:
- lib/carrierwave/test/matchers.rb
Overview
:nodoc:
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object (also: #negative_failure_message)
-
#initialize(expected) ⇒ BeIdenticalTo
constructor
A new instance of BeIdenticalTo.
- #matches?(actual) ⇒ Boolean
Constructor Details
#initialize(expected) ⇒ BeIdenticalTo
Returns a new instance of BeIdenticalTo.
11 12 13 |
# File 'lib/carrierwave/test/matchers.rb', line 11 def initialize(expected) @expected = expected end |
Instance Method Details
#description ⇒ Object
28 29 30 |
# File 'lib/carrierwave/test/matchers.rb', line 28 def description "be identical to #{@expected.inspect}" end |
#failure_message ⇒ Object
20 21 22 |
# File 'lib/carrierwave/test/matchers.rb', line 20 def "expected #{@actual.inspect} to be identical to #{@expected.inspect}" end |
#failure_message_when_negated ⇒ Object Also known as: negative_failure_message
24 25 26 |
# File 'lib/carrierwave/test/matchers.rb', line 24 def "expected #{@actual.inspect} to not be identical to #{@expected.inspect}" end |
#matches?(actual) ⇒ Boolean
15 16 17 18 |
# File 'lib/carrierwave/test/matchers.rb', line 15 def matches?(actual) @actual = actual FileUtils.identical?(@actual, @expected) end |