class CarrierWave::Test::Matchers::HaveHeight
:nodoc:
def description
def description "have an exact height of #{@height}" end
def failure_message
def failure_message "expected #{@actual.current_path.inspect} to have an exact size of #{@height}, but it was #{@actual_height}." end
def failure_message_when_negated
def failure_message_when_negated "expected #{@actual.current_path.inspect} not to have an exact size of #{@height}, but it did." end
def initialize(height)
def initialize(height) @height = height end
def matches?(actual)
def matches?(actual) @actual = actual # Satisfy expectation here. Return false or raise an error if it's not met. image = ImageLoader.load_image(@actual.current_path) @actual_height = image.height @actual_height == @height end