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)



38
39
40
# File 'lib/carrierwave/test/matchers.rb', line 38

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

- (Object) be_no_larger_than(width, height)



134
135
136
# File 'lib/carrierwave/test/matchers.rb', line 134

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

- (Object) be_no_taller_than(height)



300
301
302
# File 'lib/carrierwave/test/matchers.rb', line 300

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

- (Object) be_no_wider_than(width)



267
268
269
# File 'lib/carrierwave/test/matchers.rb', line 267

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

- (Object) have_dimensions(width, height)



168
169
170
# File 'lib/carrierwave/test/matchers.rb', line 168

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

- (Object) have_directory_permissions(expected)



100
101
102
# File 'lib/carrierwave/test/matchers.rb', line 100

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

- (Object) have_height(height)



201
202
203
# File 'lib/carrierwave/test/matchers.rb', line 201

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

- (Object) have_permissions(expected)



69
70
71
# File 'lib/carrierwave/test/matchers.rb', line 69

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

- (Object) have_width(width)



234
235
236
# File 'lib/carrierwave/test/matchers.rb', line 234

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