Sha256: e1431f3bacbcea3ee2948bbc628463da90d56362c86dbe5f8f105ac74219f31b

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 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 '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.0 spec/mockery/mockumentary_spec.rb