Sha256: 50b63ab3e0557e7cfee87c215dd1baec5fe4bd28eed0f04389db7c439679b06b
Contents?: true
Size: 733 Bytes
Versions: 20
Compression:
Stored size: 733 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 = mock('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 = mock('instance') instance.should_receive(:foo) Maid.with_instance(instance) do Maid.rules { foo } end end end
Version data entries
20 entries across 20 versions & 1 rubygems