Skip to content

Instantly share code, notes, and snippets.

@Rojo
Created December 5, 2014 19:41
Show Gist options
  • Save Rojo/06d53804a0023d78a660 to your computer and use it in GitHub Desktop.
Save Rojo/06d53804a0023d78a660 to your computer and use it in GitHub Desktop.
Trying to test a helper...
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
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