Sha256: f5d6a39ba5578fb216cf1bd4fa63304e9811a80f1d22ea119613aaa90bec2807

Contents?: true

Size: 436 Bytes

Versions: 1

Compression:

Stored size: 436 Bytes

Contents

require 'spec_helper'

describe FluffiesController, :type => :controller do
  before(:all) do
    User.destroy_all
    Entity.destroy_all

    @admin = User.create! :admin => true

    @entity1 = Entity.create! :name => 'entity 1'
    @entity2 = Entity.create! :name => 'entity 2'
  end

  it "loads entity resources and assigns to @entities" do
    User.mock @admin
    get :index

    assigns(:entities).should have(2).items
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heimdallr-resource-1.2.0 spec/controllers/fluffies_controller_spec.rb