Module: BigBro::TestHelpers
- Defined in:
- lib/bigbro.rb
Instance Method Summary collapse
-
#assert_analytics ⇒ Object
Asserts the GA <script> tag, with not much effort; Asserts the noscript tag with the descendant img.
Instance Method Details
#assert_analytics ⇒ Object
Asserts the GA <script> tag, with not much effort; Asserts the noscript tag with the descendant img.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/bigbro.rb', line 140 def assert_analytics host = BigBro.host_for(@request) assert_tag :tag => 'script', :content => /#{host}\/ga.js/ assert_tag :tag => 'noscript', :descendant => { :tag => 'img', :attributes => { :src => /#{host}\/__utm.gif\?/, :border => '0', :alt => '' } } end |