Skip to content

Instantly share code, notes, and snippets.

@domagude
Last active October 19, 2017 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domagude/98e455fa9bc76bda9c334ba7340ec6f8 to your computer and use it in GitHub Desktop.
Save domagude/98e455fa9bc76bda9c334ba7340ec6f8 to your computer and use it in GitHub Desktop.
require 'rails_helper'
RSpec.describe NavigationHelper, :type => :helper do
context 'signed in user' do
before(:each) { helper.stub(:user_signed_in?).and_return(true) }
context '#collapsible_links_partial_path' do
it "returns signed_in_links partial's path" do
expect(helper.collapsible_links_partial_path).to (
eq 'layouts/navigation/collapsible_elements/signed_in_links'
)
end
end
end
context 'non-signed in user' do
before(:each) { helper.stub(:user_signed_in?).and_return(false) }
context '#collapsible_links_partial_path' do
it "returns non_signed_in_links partial's path" do
expect(helper.collapsible_links_partial_path).to (
eq 'layouts/navigation/collapsible_elements/non_signed_in_links'
)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment