Sha256: 8c7b424650866e31be1cae72ac4e1c35b2ca10de84a4edf9e9521588394abab0
Contents?: true
Size: 880 Bytes
Versions: 67
Compression:
Stored size: 880 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 provider.should_receive(:setup_auth) provider.should_receive(:log).with("Authenticated with email foo@blah.com") provider.check_auth end end describe :push_app do example do provider.context.should_receive(:shell).with("npm publish --force") provider.push_app end end describe :setup_auth do example do f = double(:npmrc) File.should_receive(:open).with(File.expand_path(DPL::Provider::NPM::NPMRC_FILE)).and_return(f) f.should_receive(:puts).with("_auth = test") f.should_receive(:puts).with("email = foo@blah.com") provider.setup_auth end end end
Version data entries
67 entries across 67 versions & 1 rubygems