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



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

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

#be_no_larger_than(width, height) ⇒ Object



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

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

#be_no_taller_than(height) ⇒ Object



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

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

#be_no_wider_than(width) ⇒ Object



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

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

#have_dimensions(width, height) ⇒ Object



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

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

#have_directory_permissions(expected) ⇒ Object



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

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

#have_height(height) ⇒ Object



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

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

#have_permissions(expected) ⇒ Object



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

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

#have_width(width) ⇒ Object



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

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