Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (16 sloc) 437 Bytes
# -*- encoding: utf-8 -*-
require 'spec_helper'
describe StubFactory do
describe 'String' do
factory(String)
it 'should define a String instance' do
string('this is a string')[0..3].should == 'this'
end
end
describe 'Array overriding method name' do
factory(Array, :method_name => 'collection')
it 'should define an Array instance' do
collection([1, 2, 3]).length.should == 3
end
end
end