Sha256: f2c5f9d7d53320956e44b90c670aad2cd29666f51af8119830ae364c9215ae46

Contents?: true

Size: 705 Bytes

Versions: 5

Compression:

Stored size: 705 Bytes

Contents

require 'spec_helper'
require 'time'

describe Bueller::GemSpecHelper do
  let(:spec) { Gemspec.build }
  let(:helper) { Bueller::GemSpecHelper.new('.') }

  describe "#write" do
    it 'should include updates made to the gemspec' do
      file = mock(File)
      File.stub!(:open).and_yield file
      Time.stub!(:now).and_return Time.parse('2011-03-02 23:33:03')
      helper.set_date
      file.should_receive(:puts).with(/2011-03-02/)
      helper.write
    end
  end

  describe '#path' do
    it 'should return the path to the gemspec' do
      Dir.stub!(:glob).and_return [File.join(File.dirname(__FILE__), 'test.gemspec')]
      helper.path.should == "spec/bueller/test.gemspec"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bueller-0.0.9 spec/bueller/gemspec_helper_spec.rb
bueller-0.0.8 spec/bueller/gemspec_helper_spec.rb
bueller-0.0.7 spec/bueller/gemspec_helper_spec.rb
bueller-0.0.6 spec/bueller/gemspec_helper_spec.rb
bueller-0.0.5 spec/bueller/gemspec_helper_spec.rb