Skip to content

Instantly share code, notes, and snippets.

@schof
Created November 15, 2010 18:16
Show Gist options
  • Select an option

  • Save schof/700709 to your computer and use it in GitHub Desktop.

Select an option

Save schof/700709 to your computer and use it in GitHub Desktop.
before(:each) do
@user = mock_model(User).as_null_object
end
let(:inventory_unit) { mock_model(InventoryUnit).as_null_object }
describe "GET index" do
let(:collection) { mock("collection") }
before { controller.stub :collection => collection }
it 'should GET list of Inventory Units' do
get uri_for("/inventory_units.json"), nil, user_request(@user.authentication_token)
collection.should_receive(:to_json)
response.should be_ok
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment