Permalink
Browse files

Use 1.9 hash syntax in specs

  • Loading branch information...
1 parent e206a75 commit 73c8d607ab72c616620c028c00e6b87d1038104b Sebastian von Conrad committed Jan 28, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 spec/in_bed_with/analytics_spec.rb
  2. +1 −1 spec/in_bed_with/base_spec.rb
  3. +1 −1 spec/in_bed_with/gauges_spec.rb
@@ -2,7 +2,7 @@
describe InBedWith::Analytics do
it 'prints a javascript tag based on argument' do
- js = InBedWith.analytics(:property_id => 'UA-1234567-1')
+ js = InBedWith.analytics(property_id: 'UA-1234567-1')
js.should == "<script type=\"text/javascript\">var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1234567-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>"
end
@@ -17,6 +17,6 @@ def code
end
it 'does not raise an exception if an optional attribute is missing' do
- InBedWith::Test.new(:foo => 'gazonk').code.should == 'foo_with_value_gazonk'
+ InBedWith::Test.new(foo: 'gazonk').code.should == 'foo_with_value_gazonk'
end
end
@@ -2,7 +2,7 @@
describe InBedWith::Gauges do
it 'prints a javascript tag based on argument' do
- js = InBedWith.gauges(:site_id => '1234567890abcdef12345678')
+ js = InBedWith.gauges(site_id: '1234567890abcdef12345678')
js.should == "<script type=\"text/javascript\">var _gauges = _gauges || []; (function() { var t = document.createElement('script'); t.type = 'text/javascript'; t.async = true; t.id = 'gauges-tracker'; t.setAttribute('data-site-id', '1234567890abcdef12345678'); t.src = '//secure.gaug.es/track.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(t, s); })();</script>"
end

0 comments on commit 73c8d60

Please sign in to comment.