spec/dirty_proxy_spec.rb in jbox-gitolite-1.2.0 vs spec/dirty_proxy_spec.rb in jbox-gitolite-1.2.1
- old
+ new
@@ -1,17 +1,18 @@
-require 'gitolite/dirty_proxy'
require 'spec_helper'
describe Gitolite::DirtyProxy do
it "should create a new instance given valid attributes" do
Gitolite::DirtyProxy.new([]).should_not be_nil
end
+
let(:target) { ['foo', 'bar'] }
let(:proxy) { Gitolite::DirtyProxy.new(target) }
+
describe 'delegating to the target object' do
it 'should act as instance of the target' do
proxy.should be_instance_of target.class
end
@@ -22,10 +23,11 @@
it 'should equal the target' do
expect(proxy).to eql(target)
end
end
+
describe 'dirty checking methods' do
it 'should respond to clean_up!' do
proxy.respond_to?(:clean_up!).should be_true
end
@@ -58,6 +60,7 @@
context 'when target object has changed in depth' do
before(:each) { proxy[0] << 'ooo' }
include_examples 'dirty? clean_up!'
end
end
+
end