Skip to content
Browse files

Merge pull request #1157 from rubiii/1-0-stable

newgem should require the version file
  • Loading branch information...
2 parents e0fba56 + a8f4873 commit 5cce885215e056faaad1b9f3a5551ff71644b8ac Andre Arko committed
Showing with 7 additions and 1 deletion.
  1. +2 −0 lib/bundler/templates/newgem/lib/newgem.rb.tt
  2. +5 −1 spec/other/newgem_spec.rb
View
2 lib/bundler/templates/newgem/lib/newgem.rb.tt
@@ -1,3 +1,5 @@
+require "<%=config[:name]%>/version"
+
<%- config[:constant_array].each_with_index do |c,i| -%>
<%= ' '*i %>module <%= c %>
<%- end -%>
View
6 spec/other/newgem_spec.rb
@@ -21,4 +21,8 @@
bundled_app("test-gem/lib/test-gem/version.rb").read.should =~ /module Test\n module Gem/
bundled_app("test-gem/lib/test-gem.rb").read.should =~ /module Test\n module Gem/
end
-end
+
+ it "requires the version file" do
+ bundled_app("test-gem/lib/test-gem.rb").read.should =~ /require "test-gem\/version"/
+ end
+end

0 comments on commit 5cce885

Please sign in to comment.
Something went wrong with that request. Please try again.