Sha256: 31009cc7f33c71cd1874f5cf7f866cf7c25c938cfebeb49e26afdb235b4b7b91
Contents?: true
Size: 938 Bytes
Versions: 15
Compression:
Stored size: 938 Bytes
Contents
module ThinkingSphinx module Panes; end end require 'thinking_sphinx/panes/distance_pane' describe ThinkingSphinx::Panes::DistancePane do let(:pane) { ThinkingSphinx::Panes::DistancePane.new context, object, raw } let(:context) { double('context') } let(:object) { double('object') } let(:raw) { {} } describe '#distance' do it "returns the object's geodistance attribute by default" do raw['geodist'] = 123.45 pane.distance.should == 123.45 end it "converts string geodistances to floats" do raw['geodist'] = '123.450' pane.distance.should == 123.45 end end describe '#geodist' do it "returns the object's geodistance attribute by default" do raw['geodist'] = 123.45 pane.geodist.should == 123.45 end it "converts string geodistances to floats" do raw['geodist'] = '123.450' pane.geodist.should == 123.45 end end end
Version data entries
15 entries across 15 versions & 1 rubygems