Skip to content

Commit

Permalink
Spec that fails with undefined prerelease? for nil
Browse files Browse the repository at this point in the history
  • Loading branch information
fotanus@gmail.com authored and fotanus@gmail.com committed May 13, 2015
1 parent 654e44a commit 7fff71a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions spec/install/gemfile/gemspec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@
expect(error).to match(/There are no gemspecs at #{tmp.join('foo')}/)
end

it "should raise if there is no version on the gemspec" do
build_lib("noversion", "noversion", :path => tmp.join("noversion"))

error = install_gemfile(<<-G, :expect_err => true)
source "file://#{gem_repo2}"
gemspec :path => '#{tmp.join("noversion")}'
G
expect(error).to match(/version error message/)
end

it "should raise if there are too many gemspecs available" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("foo2.gemspec", "")
Expand Down
2 changes: 1 addition & 1 deletion spec/support/builders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def initialize(context, name, version)
@name = name
@spec = Gem::Specification.new do |s|
s.name = name
s.version = version
s.version = version unless version == "noversion"
s.summary = "This is just a fake gem for testing"
end
@files = {}
Expand Down

0 comments on commit 7fff71a

Please sign in to comment.