Sha256: 10d3b0a2476e314c3e564760a2a70c2620abe2f7fdcc5f5ee6f0a24e5983fcc8

Contents?: true

Size: 809 Bytes

Versions: 13

Compression:

Stored size: 809 Bytes

Contents

require 'spec_helper'

describe AlchemyHelper do

  context "maximum amount of images option" do

		before(:each) do
		  @options = {}
		end

    context "with max_images option" do

			it "should return nil for empty string" do
	      @options[:max_images] = ""
				max_image_count.should be(nil)
	    end

	    it "should return an integer for string number" do
	      @options[:max_images] = "1"
				max_image_count.should be(1)
	    end

    end

		context "with maximum_amount_of_images option" do

			it "should return nil for empty string" do
	      @options[:maximum_amount_of_images] = ""
				max_image_count.should be(nil)
	    end

	    it "should return an integer for string number" do
	      @options[:maximum_amount_of_images] = "1"
				max_image_count.should be(1)
	    end

		end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
alchemy_cms-2.0.7 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.6.1 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.5 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.4 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.3.1 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.1.beta1 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.3 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.2 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.1 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.rc6 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.rc5 spec/helpers/alchemy_helper_spec.rb
alchemy_cms-2.0.rc4 spec/helpers/alchemy_helper_spec.rb