Sha256: b21f555bb5c0c1aee8a72baffc730a71344c9b034fd3115972bb536a2314b137

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")

class Require
  describe Gemspec do
    
    it "should generate a valid gemspec instance" do
      Require.stub!(:root).and_return(SPEC + "/fixture")
      Require.reset do
        gem :rspec, '=1.3.0'
      
        gemspec do
          author 'Winton Welsh'
          dependencies do
            gem :rspec
          end
          email 'mail@wintoni.us'
          name 'require'
          homepage "http://github.com/winton/#{name}"
          summary "summary"
          version '0.1.0'
        end
      end
      
      FileUtils.mkdir_p(File.expand_path("#{File.dirname(__FILE__)}/../fixture/ignore_me"))
      
      s = Require.gemspec
      s.authors.should == [ "Winton Welsh" ]
      s.date.should == Time.utc(Time.now.year, Time.now.mon, Time.now.mday, 8)
      s.default_executable.should == "bin"
      s.dependencies.should == [Gem::Dependency.new("rspec", Gem::Requirement.new(["= 1.3.0"]), :runtime)]
      s.email.should == 'mail@wintoni.us'
      s.executables.should == ["bin"]
      s.extra_rdoc_files.should == ["README.markdown"]
      s.files.should == ["bin", "bin/bin", "lib", "lib/lib.rb", "README.markdown"]
      s.homepage.should == "http://github.com/winton/require"
      s.name.should == "require"
      s.require_paths.should == ["lib"]
      s.summary.should == 'summary'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
require-0.2.6 spec/require/gemspec_spec.rb
require-0.2.5 spec/require/gemspec_spec.rb
require-0.2.4 spec/require/gemspec_spec.rb
require-0.2.3 spec/require/gemspec_spec.rb