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

- (Object) be_identical_to(expected)



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

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

- (Object) be_no_larger_than(width, height)



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

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

- (Object) be_no_taller_than(height)



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

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

- (Object) be_no_wider_than(width)



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

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

- (Object) have_dimensions(width, height)



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

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

- (Object) have_directory_permissions(expected)



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

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

- (Object) have_height(height)



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

def have_height(height)
  HaveHeight.new(height)
end

- (Object) have_permissions(expected)



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

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

- (Object) have_width(width)



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

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