Sha256: 1e7dbad050119d8610b0b218ea35df787c76b7ee439a3cddd7e0cf8a6ade2c19

Contents?: true

Size: 746 Bytes

Versions: 2

Compression:

Stored size: 746 Bytes

Contents

require 'spec_helper'

describe Killbill::<%= class_name %>::PaymentPlugin do
  before(:each) do
    Dir.mktmpdir do |dir|
      file = File.new(File.join(dir, '<%= identifier %>.yml'), "w+")
      file.write(<<-eos)
:<%= identifier %>:
  :test: true
# As defined by spec_helper.rb
:database:
  :adapter: 'sqlite3'
  :database: 'test.db'
      eos
      file.close

      @plugin = Killbill::<%= class_name %>::PaymentPlugin.new
      @plugin.logger = Logger.new(STDOUT)
      @plugin.logger.level = Logger::INFO
      @plugin.conf_dir = File.dirname(file)

      # Start the plugin here - since the config file will be deleted
      @plugin.start_plugin
    end
  end

  it 'should start and stop correctly' do
    @plugin.stop_plugin
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
killbill-3.1.1 generators/active_merchant/templates/spec/base_plugin_spec.rb
killbill-3.1.0 generators/active_merchant/templates/spec/base_plugin_spec.rb