Created
January 15, 2013 06:23
-
-
Save nigelr/4536638 to your computer and use it in GitHub Desktop.
application_controller_spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "spec_helper" | |
describe ApplicationController do | |
controller do | |
def index | |
render nothing: true | |
end | |
end | |
let(:user) { create(:user_agent) } | |
describe ".current_agent" do | |
before do | |
sign_in user | |
get :index | |
end | |
it('has method that returns current_agent') { expect(controller.current_agent).to eq(user.agent) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment