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
-
#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.
13 14 15 |
# File 'lib/carrierwave/test/matchers.rb', line 13 def initialize(expected) @expected = expected end |
Instance Method Details
#description ⇒ Object
30 31 32 |
# File 'lib/carrierwave/test/matchers.rb', line 30 def description "be identical to #{@expected.inspect}" end |
#failure_message ⇒ Object
22 23 24 |
# File 'lib/carrierwave/test/matchers.rb', line 22 def "expected #{@actual.inspect} to be identical to #{@expected.inspect}" end |
#matches?(actual) ⇒ Boolean
17 18 19 20 |
# File 'lib/carrierwave/test/matchers.rb', line 17 def matches?(actual) @actual = actual FileUtils.identical?(@actual, @expected) end |
#negative_failure_message ⇒ Object
26 27 28 |
# File 'lib/carrierwave/test/matchers.rb', line 26 def "expected #{@actual.inspect} to not be identical to #{@expected.inspect}" end |