summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-05 16:51:54 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-25 11:16:58 -0500
commit5248cc34cb57b31c27f67c15836455d26228d6db (patch)
tree0b2eb127f56d466f023b6c34a2a90bb4f215f74c
parentd11481852434cce7f192bb678374577107b86ea9 (diff)
downloadbundler-5248cc34cb57b31c27f67c15836455d26228d6db.tar.gz
Automatically add platform to version in the spec’s builders
-rw-r--r--spec/support/builders.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 337234f14a..7436779d15 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -610,7 +610,10 @@ module Spec
end
def _default_files
- @_default_files ||= { "lib/#{name}.rb" => "#{Builders.constantize(name)} = '#{version}'" }
+ @_default_files ||= begin
+ platform_string = " #{@spec.platform}" unless @spec.platform == Gem::Platform::RUBY
+ { "lib/#{name}.rb" => "#{Builders.constantize(name)} = '#{version}#{platform_string}'" }
+ end
end
def _default_path