Sha256: 6de77d607a26c6c62c6064bd4f9b83e5db063f2d8855862275dfffecff178910

Contents?: true

Size: 411 Bytes

Versions: 12

Compression:

Stored size: 411 Bytes

Contents

require 'spec_helper'
require 'tronprint/rails/tronprint_helper'

describe TronprintHelper do
  let :helper do
    c = Class.new
    c.send :include, TronprintHelper
    c.new
  end

  describe '#total_footprint' do
    it 'returns the total footprint' do
      Tronprint.statistics.stub!(:emission_estimate).and_return mock(Object, :to_f => 89.4)
      helper.total_footprint.should == 89.4
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tronprint-1.2.0 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.1.5 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.1.4 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.1.3 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.1.2 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.1.1 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.1.0 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.0.5 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.0.4 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.0.2 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.0.1 spec/tronprint/rails/tronprint_helper_spec.rb
tronprint-1.0.0 spec/tronprint/rails/tronprint_helper_spec.rb