Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use view helper to instead of hard coding the stylesheet path.

  • Loading branch information...
commit 3969436d23b0f7be3fcb72e09d731397d744a8a1 1 parent ef16db5
Jason Weathered jasoncodes authored

Showing 1 changed file with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. +8 1 spec/requests/assets_spec.rb
9 spec/requests/assets_spec.rb
... ... @@ -1,8 +1,15 @@
1 1 require 'spec_helper'
2 2
3 3 describe 'stylesheet', :type => :request do
  4 + include RSpec::Rails::HelperExampleGroup
  5 +
  6 + def stylesheet_path
  7 + html = helper.stylesheet_link_tag 'postmarkdown/postmarkdown'
  8 + Nokogiri::HTML.fragment(html).at('link')[:href]
  9 + end
  10 +
4 11 it 'should be served' do
5   - visit '/stylesheets/postmarkdown/postmarkdown.css'
  12 + visit stylesheet_path
6 13 page.source.should match /font-family:/
7 14 page.source.should match /}\s*\z/
8 15 end

0 comments on commit 3969436

Please sign in to comment.
Something went wrong with that request. Please try again.