Commit 8f1c18ac authored by Paul Asmuth's avatar Paul Asmuth
Browse files

gauge_spec: fixed another ruby 1.8.7 incompatibility

parent 6026e06a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -30,13 +30,13 @@ describe FnordMetric::Gauge do
  it "should raise an error when initialize without key" do
    lambda{ 
      FnordMetric::Gauge.new({:key_prefix => "foo"})
    }.should raise_error(KeyError)
    }.should raise_error(key_error_klass)
  end

  it "should raise an error when initialize without key_prefix" do
    lambda{ 
      FnordMetric::Gauge.new({:key => "foo"})
    }.should raise_error(KeyError)
    }.should raise_error(key_error_klass)
  end

  it "should generate the correct key without append" do
+4 −0
Original line number Diff line number Diff line
@@ -36,3 +36,7 @@ class RedisWrap
  end

end

def key_error_klass
  RUBY_VERSION =~ /1.9.\d/ ? KeyError : IndexError
end
 No newline at end of file