Sha256: 555a6d008f3217c545b92059ec0916f894dd95aa0a399d895e827ff88151891e
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require "minitest/autorun" require File.expand_path("../minitest_helper", __FILE__) describe "Configuration" do before do Callisto.configuration.reset end it "should assign max workers to pool" do Callisto.configure do |config| config.max_workers = 13 end Callisto::Pool.settings.max_workers.must_equal 13 end it "should assign thumbnail defaults" do Callisto.configure do |config| config.thumbnail_size = "20x45" config.thumbnail_quality = 75 end Callisto.configuration.thumbnail_size.must_equal "20x45" Callisto.configuration.thumbnail_quality.must_equal 75 end it "can be reset" do default_size = Callisto::Configuration::Defaults::THUMBNAIL[:size] default_quality = Callisto::Configuration::Defaults::THUMBNAIL[:quality] Callisto.configure do |config| config.thumbnail_size = "20x45" config.thumbnail_quality = 75 end Callisto.configuration.reset Callisto.configuration.thumbnail_size.must_equal default_size Callisto.configuration.thumbnail_quality.must_equal default_quality end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
callisto-0.9.1 | spec/configuration_spec.rb |