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
- #failure_message ⇒ Object
-
#initialize(expected) ⇒ BeIdenticalTo
constructor
A new instance of BeIdenticalTo.
- #matches?(actual) ⇒ Boolean
- #negative_failure_message ⇒ Object
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
#failure_message ⇒ Object
18 19 20 |
# File 'lib/carrierwave/test/matchers.rb', line 18 def "expected #{@actual.inspect} to be identical to #{@expected.inspect}" end |
#matches?(actual) ⇒ Boolean
14 15 16 17 |
# File 'lib/carrierwave/test/matchers.rb', line 14 def matches?(actual) @actual = actual FileUtils.identical?(@actual, @expected) end |
#negative_failure_message ⇒ Object
21 22 23 |
# File 'lib/carrierwave/test/matchers.rb', line 21 def "expected #{@actual.inspect} to not be identical to #{@expected.inspect}" end |