Sha256: 23d41400eba9d0b770cd6078ee13069090448fa5cc5ed5319679c5b024b15f75
Contents?: true
Size: 722 Bytes
Versions: 1
Compression:
Stored size: 722 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe Mockumentary do describe '.introspect' do before do Rails.stub(:root).and_return(FIXTURE_ROOT) @classes = [] Mockery.stub(:generate) do |args| @classes << args end end it 'does not fail with non-ar models' do lambda { Mockumentary.inspect }.should_not raise_error end it 'calls Mockery.generate for each of the first level active record objects found' do Mockumentary.introspect @classes.should include User, Event, EventResource, Task end it 'calls Mockery.generate on nested models' do Mockumentary.introspect @classes.should include Event::Follow end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mockumentary-0.2.1 | spec/mockery/mockumentary_spec.rb |