Sha256: 98d654d61946b7be07ea4e69d68d987734398299c6742281654b4323b78dc117
Contents?: true
Size: 737 Bytes
Versions: 7
Compression:
Stored size: 737 Bytes
Contents
require 'spec_helper' describe Maid do it 'should include Maid::NumericExtensions::Time' do 1.minute.should == 60 end it 'should include Maid::NumericExtensions::SizeToKb' do 1.megabyte.should == 1024 end end describe Maid, '.with_instance' do it 'should temporarily set the instance to the given argument and execute the block' do instance = double('instance') Maid.with_instance(instance) { 0 }.should == 0 Maid.instance_eval { @instance }.should be_nil end end describe Maid, '.rules' do it 'should run in the context of the Maid::Maid instance' do instance = double('instance') instance.should_receive(:foo) Maid.with_instance(instance) do Maid.rules { foo } end end end
Version data entries
7 entries across 7 versions & 1 rubygems