summaryrefslogtreecommitdiff
path: root/spec/support/builders.rb
diff options
context:
space:
mode:
authorAsutosh Palai <asupalai@gmail.com>2016-05-24 11:38:09 +0530
committerAsutosh Palai <asupalai@gmail.com>2016-05-24 21:15:01 +0530
commitc34633e591f35c3506bbec6515ee2ba33e7ee024 (patch)
tree616d8c93643b9b8d8fcfb6366fcd30fa6af4ddef /spec/support/builders.rb
parent867e2d9c6cfc033f689340c2c592db9119dcaa8c (diff)
downloadbundler-c34633e591f35c3506bbec6515ee2ba33e7ee024.tar.gz
Added spec helper to build plugin
Diffstat (limited to 'spec/support/builders.rb')
-rw-r--r--spec/support/builders.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index eaa68f51df..feabdc0e47 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -419,6 +419,10 @@ module Spec
GitReader.new lib_path(spec.full_name)
end
+ def build_plugin(name, *args, &blk)
+ build_with(PluginBuilder, name, args, &blk)
+ end
+
private
def build_with(builder, name, args, &blk)
@@ -701,6 +705,12 @@ module Spec
end
end
+ class PluginBuilder < GemBuilder
+ def _default_files
+ @_default_files ||= super.merge("plugin.rb" => "")
+ end
+ end
+
TEST_CERT = <<-CERT.gsub(/^\s*/, "")
-----BEGIN CERTIFICATE-----
MIIDMjCCAhqgAwIBAgIBATANBgkqhkiG9w0BAQUFADAnMQwwCgYDVQQDDAN5b3Ux