Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'flat-options' of https://github.com/dblock/analytical i…

…nto dblock-flat-options
  • Loading branch information...
commit e20b256c8b46495c694eae5e2ec9fa34cf219b17 2 parents 05556cc + 3cb1871
@jkrall jkrall authored
Showing with 8 additions and 1 deletion.
  1. +1 −1  lib/analytical.rb
  2. +7 −0 spec/analytical_spec.rb
View
2  lib/analytical.rb
@@ -44,7 +44,7 @@ def analytical
options[:modules] = []
end
options[:modules] = options[:filter_modules].call(self, options[:modules]) if options[:filter_modules]
- options[:javascript_helpers] ||= true
+ options[:javascript_helpers] ||= true if options[:javascript_helpers].nil?
Analytical::Api.new options
end
end
View
7 spec/analytical_spec.rb
@@ -30,6 +30,13 @@ def request
d.options[:string_option].should == "string"
end
+ it 'should preserve :javascript_helpers option' do
+ options = { :javascript_helpers => false, :modules => [] }
+ DummyForInit.analytical options
+ a = DummyForInit.new.analytical
+ a.options[:javascript_helpers].should be_false
+ end
+
it 'should use the supplied options' do
DummyForInit.analytical :modules=>[:google]
d = DummyForInit.new.analytical
Please sign in to comment.
Something went wrong with that request. Please try again.