Module: CarrierWave::Test::Matchers

Defined in:
lib/carrierwave/test/matchers.rb

Overview

These are some matchers that can be used in RSpec specs, to simplify the testing of uploaders.

Defined Under Namespace

Classes: BeIdenticalTo, BeNoLargerThan, BeNoTallerThan, BeNoWiderThan, HaveDimensions, HavePermissions, ImageLoader, MagickWrapper, MiniMagickWrapper

Instance Method Summary collapse

Instance Method Details

#be_identical_to(expected) ⇒ Object



35
36
37
# File 'lib/carrierwave/test/matchers.rb', line 35

def be_identical_to(expected)
  BeIdenticalTo.new(expected)
end

#be_no_height_than(height) ⇒ Object



185
186
187
# File 'lib/carrierwave/test/matchers.rb', line 185

def be_no_height_than(height)
  BeNoTallerThan.new(height)
end

#be_no_larger_than(width, height) ⇒ Object



94
95
96
# File 'lib/carrierwave/test/matchers.rb', line 94

def be_no_larger_than(width, height)
  BeNoLargerThan.new(width, height)
end

#be_no_wider_than(width) ⇒ Object



155
156
157
# File 'lib/carrierwave/test/matchers.rb', line 155

def be_no_wider_than(width)
  BeNoWiderThan.new(width)
end

#have_dimensions(width, height) ⇒ Object



125
126
127
# File 'lib/carrierwave/test/matchers.rb', line 125

def have_dimensions(width, height)
  HaveDimensions.new(width, height)
end

#have_permissions(expected) ⇒ Object



63
64
65
# File 'lib/carrierwave/test/matchers.rb', line 63

def have_permissions(expected)
  HavePermissions.new(expected)
end