1 require File.dirname(__FILE__) + '/../spec_helper'
2 require 'mspec/runner/shared'
4 describe Object, "#it_behaves_like" do
10 @recv.stub!(:it_should_behave_like)
13 it "creates @method set to the name of the aliased method" do
14 @recv.it_behaves_like "something", :some_method
15 @recv.instance_variable_get(:@method).should == :some_method
18 it "creates @object if the passed object is not nil" do
19 @recv.it_behaves_like "something", :some_method, :some_object
20 @recv.instance_variable_get(:@object).should == :some_object
23 it "sends :it_should_behave_like" do
24 @recv.should_receive(:it_should_behave_like)
25 @recv.it_behaves_like "something", :some_method