Sha256: 5cd2734185667e26217394022d56933afdc8f6765c7175c73d21ad11907f293c
Contents?: true
Size: 1.04 KB
Versions: 32
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' describe Dugway::Drops::ThemeImageSetsDrop do let(:customization) { { :slideshow_images => [ { :url => 'http://mysite.com/slideshow_one.png', :width => 450, :height => 175 }, { :url => 'http://mysite.com/slideshow_two.png', :width => 450, :height => 175 }, { :url => 'http://mysite.com/slideshow_three.png', :width => 450, :height => 175 } ] } } let(:theme_image_sets) { Dugway::Drops::ThemeImageSetsDrop.new(Dugway.theme.customization.update(customization.stringify_keys)).tap { |drop| drop.context = Liquid::Context.new({}, {}, { :settings => Dugway.theme.settings }) } } describe "when images for a given variable exists" do it "should return all images in an array" do images = theme_image_sets.slideshow_images images.should_not be_empty images.size.should == 3 end end describe "when images for a given variable do not exist" do it "should return an empty array" do theme_image_sets.faker.should == [] end end end
Version data entries
32 entries across 32 versions & 1 rubygems