Sha256: caf9c93f7f8b060fc072006cb71e2cb72e573edfb60b4431469fb72df61253c1
Contents?: true
Size: 801 Bytes
Versions: 6
Compression:
Stored size: 801 Bytes
Contents
require 'spec_helper' describe Metric do specify { subject.convert('1').should eq '1' } specify { subject.convert('1abc').should eq '1abc' } specify { subject.convert(1.2).should eq 1.2 } specify { subject.convert({}).should eq({}) } it 'returns last value' do value = stub(:value) subject.stub(:values => [stub, stub, stub(:last_value, :value => value)]) subject.last_value.should == value end it 'returns last updater' do user = stub(:user) subject.stub(:values => [stub, stub, stub(:last_value, :created_by => user)]) subject.last_updated_by.should == user end it 'returns last update date' do date = stub(:date) subject.stub(:values => [stub, stub, stub(:last_value, :created_at => date)]) subject.last_updated_at.should == date end end
Version data entries
6 entries across 6 versions & 1 rubygems