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

Version Path
dpl-1.5.8.travis.330.1 spec/provider/npm.rb
dpl-1.5.8.travis.328.1 spec/provider/npm.rb
dpl-1.5.8.travis.326.1 spec/provider/npm.rb
dpl-1.5.8.travis.325.1 spec/provider/npm.rb
dpl-1.5.8.travis.312.1 spec/provider/npm.rb
dpl-1.5.8.travis.309.1 spec/provider/npm.rb
dpl-1.5.8.travis.308.1 spec/provider/npm.rb
dpl-1.5.8.travis.303.1 spec/provider/npm.rb
dpl-1.5.7 spec/provider/npm.rb
dpl-1.5.6 spec/provider/npm.rb
dpl-1.5.5 spec/provider/npm.rb
dpl-1.5.5.travis.270.1 spec/provider/npm.rb
dpl-1.5.4 spec/provider/npm.rb
dpl-1.5.3.travis.269.1 spec/provider/npm.rb
dpl-1.5.3.travis.268.1 spec/provider/npm.rb
dpl-1.5.3.travis.264.1 spec/provider/npm.rb
dpl-1.5.3.travis.265.1 spec/provider/npm.rb
dpl-1.5.3.travis.262.1 spec/provider/npm.rb
dpl-1.5.3.travis.261.1 spec/provider/npm.rb
dpl-1.5.3.travis.259.1 spec/provider/npm.rb