Created
December 5, 2014 19:41
-
-
Save Rojo/06d53804a0023d78a660 to your computer and use it in GitHub Desktop.
Trying to test a helper...
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
module WelcomeHelper | |
def social_share_button(network) | |
content_tag :div, class: "btn btn-#{network}" do | |
link_to ENV["#{network}_share"] do | |
image_tag "#{network}.png", class: 'social-image' | |
end | |
end | |
end | |
end |
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 'rails_helper' | |
RSpec.describe WelcomeHelper do | |
describe '#social_share_button' do | |
expect(helper.social_share_button 'facebook').to 'some assertion' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment