Skip to content

Commit

Permalink
Fix application_helper tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasiensen committed Mar 3, 2015
1 parent 2d1ad16 commit 17587de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions monologue.gemspec
Expand Up @@ -23,6 +23,7 @@ Gem::Specification.new do |s|
s.add_dependency "jquery-rails"
s.add_dependency "ckeditor",'~> 4.1.1'
s.add_dependency 'select2-rails', '~> 3.2'
s.add_dependency 'responders', '~> 2.0'

s.add_development_dependency "rspec-rails", "~> 2.8"
s.add_development_dependency 'factory_girl_rails', '~> 1.4.0'
Expand Down
16 changes: 8 additions & 8 deletions spec/helpers/application_helper_spec.rb
Expand Up @@ -43,31 +43,31 @@
describe "social icons+links" do
context "render if enabled" do
it "generate rss <link> tag for <head>" do
helper.rss_head_link.should eq "<link href=\"http://test.host/monologue/feed\" rel=\"alternate\" title=\"RSS\" type=\"application/rss+xml\" />"
helper.rss_head_link.should eq "<link href=\"http://test.host/feed\" rel=\"alternate\" title=\"RSS\" type=\"application/rss+xml\" />"
end

it "generate rss icon" do
helper.rss_icon.should eq "<a class=\"social\" href=\"http://test.host/monologue/feed\" target=\"_blank\"><i class=\"foundicon-rss\"></i></a>"
helper.rss_icon.should eq "<a href=\"http://test.host/feed\" class=\"social\" target=\"_blank\"><i class=\"foundicon-rss\"></i></a>"
end

it "generate github" do
helper.github_icon.should eq "<a class=\"social\" href=\"http://github.com/#{Monologue::Config.github_username}\" target=\"_blank\"><i class=\"foundicon-github\"></i></a>"
helper.github_icon.should eq "<a href=\"http://github.com/#{Monologue::Config.github_username}\" class=\"social\" target=\"_blank\"><i class=\"foundicon-github\"></i></a>"
end

it "generate twitter" do
helper.twitter_icon.should eq "<a class=\"social\" href=\"http://twitter.com/#{Monologue::Config.twitter_username}\" target=\"_blank\"><i class=\"foundicon-twitter\"></i></a>"
helper.twitter_icon.should eq "<a href=\"http://twitter.com/#{Monologue::Config.twitter_username}\" class=\"social\" target=\"_blank\"><i class=\"foundicon-twitter\"></i></a>"
end

it "generate linkedin" do
helper.linkedin_icon.should eq "<a class=\"social\" href=\"#{Monologue::Config.linkedin_url}\" target=\"_blank\"><i class=\"foundicon-linkedin\"></i></a>"
helper.linkedin_icon.should eq "<a href=\"#{Monologue::Config.linkedin_url}\" class=\"social\" target=\"_blank\"><i class=\"foundicon-linkedin\"></i></a>"
end

it "generate googleplus" do
helper.googleplus_icon.should eq "<a class=\"social\" href=\"#{Monologue::Config.google_plus_account_url}\" target=\"_blank\"><i class=\"foundicon-google-plus\"></i></a>"
helper.googleplus_icon.should eq "<a href=\"#{Monologue::Config.google_plus_account_url}\" class=\"social\" target=\"_blank\"><i class=\"foundicon-google-plus\"></i></a>"
end

it "generate facebook" do
helper.facebook_icon.should eq "<a class=\"social\" href=\"#{Monologue::Config.facebook_url}\" target=\"_blank\"><i class=\"foundicon-facebook\"></i></a>"
helper.facebook_icon.should eq "<a href=\"#{Monologue::Config.facebook_url}\" class=\"social\" target=\"_blank\"><i class=\"foundicon-facebook\"></i></a>"
end
end

Expand Down Expand Up @@ -147,4 +147,4 @@
end

end
end
end

0 comments on commit 17587de

Please sign in to comment.