Sha256: 6b9bdd84b0e3f617c00c19739e86538b2a2005c0f138ae279e8e4cad79ba6825
Contents?: true
Size: 478 Bytes
Versions: 1
Compression:
Stored size: 478 Bytes
Contents
require 'spec_helper' describe Metric do before do reset_config end it "calls metric.io" do stub_request(:get, "http://metric.io/track.js"). with(:query => {"api_key" => "spec", "metric" => "hits"}). to_return(:status => 200, :body => "{\"total\":1}", :headers => {}) Metric.track("hits").should == "{\"total\":1}" end it "encodes the request url" do Metric.parse_metric("hits and spaces").should == "&metric=hits+and+spaces" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
metric-0.0.1 | spec/metric_spec.rb |