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: BeFormat, BeIdenticalTo, BeNoLargerThan, BeNoTallerThan, BeNoWiderThan, HaveDimensions, HaveDirectoryPermissions, HaveHeight, HavePermissions, HaveWidth, ImageLoader, MagickWrapper, MiniMagickWrapper

Instance Method Summary collapse

Instance Method Details

#be_format(expected) ⇒ Object



331
332
333
# File 'lib/carrierwave/test/matchers.rb', line 331

def be_format(expected)
  BeFormat.new(expected)
end

#be_identical_to(expected) ⇒ Object



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

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

#be_no_larger_than(width, height) ⇒ Object



132
133
134
# File 'lib/carrierwave/test/matchers.rb', line 132

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

#be_no_taller_than(height) ⇒ Object



298
299
300
# File 'lib/carrierwave/test/matchers.rb', line 298

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

#be_no_wider_than(width) ⇒ Object



265
266
267
# File 'lib/carrierwave/test/matchers.rb', line 265

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

#have_dimensions(width, height) ⇒ Object



166
167
168
# File 'lib/carrierwave/test/matchers.rb', line 166

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

#have_directory_permissions(expected) ⇒ Object



98
99
100
# File 'lib/carrierwave/test/matchers.rb', line 98

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

#have_height(height) ⇒ Object



199
200
201
# File 'lib/carrierwave/test/matchers.rb', line 199

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

#have_permissions(expected) ⇒ Object



67
68
69
# File 'lib/carrierwave/test/matchers.rb', line 67

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

#have_width(width) ⇒ Object



232
233
234
# File 'lib/carrierwave/test/matchers.rb', line 232

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