Skip to content

Instantly share code, notes, and snippets.

@mashiro
Created July 24, 2013 11:53
Show Gist options
  • Select an option

  • Save mashiro/6069882 to your computer and use it in GitHub Desktop.

Select an option

Save mashiro/6069882 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe UsersController do
let(:valid_params) { {'name' => 'test name'} }
let(:invalid_params) { {'__dummy__' => 123} }
it_behaves_like 'a indexable action', User, role: :user
it_behaves_like 'a showable action', User, role: :user
it_behaves_like 'a creatable action', User, role: :admin
it_behaves_like 'a updatable action', User, role: :admin
it_behaves_like 'a destroyable action', User, role: :admin
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment