Sha256: 4150f1bddfbef7cf7800a2f862d48c3acc24e70d46580524c6ce27f48c65cf54
Contents?: true
Size: 938 Bytes
Versions: 41
Compression:
Stored size: 938 Bytes
Contents
require 'spec_helper' require 'dpl/provider/npm' describe DPL::Provider::NPM do subject :provider do described_class.new(DummyContext.new, :email => 'foo@blah.com', :api_key => 'test') end describe "#check_auth" do example do expect(provider).to receive(:setup_auth) expect(provider).to receive(:log).with("Authenticated with email foo@blah.com") provider.check_auth end end describe "#push_app" do example do expect(provider.context).to receive(:shell).with("env NPM_API_KEY=test npm publish") provider.push_app end end describe "#setup_auth" do example do f = double(:npmrc) expect(File).to receive(:open).with(File.expand_path(DPL::Provider::NPM::NPMRC_FILE), 'w').and_return(f) expect(f).to receive(:puts).with("_auth = ${NPM_API_KEY}") expect(f).to receive(:puts).with("email = foo@blah.com") provider.setup_auth end end end
Version data entries
41 entries across 41 versions & 1 rubygems