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, HaveDirectoryPermissions, HaveHeight, HavePermissions, HaveWidth, 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_larger_than(width, height) ⇒ Object



122
123
124
# File 'lib/carrierwave/test/matchers.rb', line 122

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

#be_no_taller_than(height) ⇒ Object



273
274
275
# File 'lib/carrierwave/test/matchers.rb', line 273

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

#be_no_wider_than(width) ⇒ Object



243
244
245
# File 'lib/carrierwave/test/matchers.rb', line 243

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

#have_dimensions(width, height) ⇒ Object



153
154
155
# File 'lib/carrierwave/test/matchers.rb', line 153

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

#have_directory_permissions(expected) ⇒ Object



91
92
93
# File 'lib/carrierwave/test/matchers.rb', line 91

def have_directory_permissions(expected)
  HaveDirectoryPermissions.new(expected)
end

#have_height(height) ⇒ Object



183
184
185
# File 'lib/carrierwave/test/matchers.rb', line 183

def have_height(height)
  HaveHeight.new(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

#have_width(width) ⇒ Object



213
214
215
# File 'lib/carrierwave/test/matchers.rb', line 213

def have_width(width)
  HaveWidth.new(width)
end