Sha256: 80c2c1f4046f287af3e3a83103cf206e2df96340d67c298db3d44a98cfee2df1

Contents?: true

Size: 1.18 KB

Versions: 4

Compression:

Stored size: 1.18 KB

Contents

require 'solidus_dev_support/extension'

RSpec.describe SolidusDevSupport::Extension do
  describe '#default_homepage' do
    before do
      expect(subject).to receive(:git).with('remote get-url origin', any_args).and_return(remote)
      expect(subject).to receive(:github_user).and_return('[USERNAME]')
      expect(subject).to receive(:file_name).and_return('solidus_foo_bar')
    end

    context 'with a git ssh-style remote' do
      let(:remote) { 'git@github.com:solidusio-contrib/solidus_extension_dev_tools.git' }

      it 'generates a github home page value' do
        expect(subject.default_homepage).to eq('https://github.com/solidusio-contrib/solidus_extension_dev_tools')
      end
    end

    context 'with a git https remote' do
      let(:remote) { 'https://github.com/solidusio-contrib/solidus_extension_dev_tools.git' }

      it 'generates a github home page value' do
        expect(subject.default_homepage).to eq('https://github.com/solidusio-contrib/solidus_extension_dev_tools')
      end
    end
  end

  describe '#default_gemspec' do
    it 'has a changelog_uri' do
      expect(subject.default_gemspec.metadata['changelog_uri']).to end_with('/releases')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_dev_support-2.1.0 spec/lib/extension_spec.rb
solidus_dev_support-2.0.1 spec/lib/extension_spec.rb
solidus_dev_support-2.0.0 spec/lib/extension_spec.rb
solidus_dev_support-1.6.0 spec/lib/extension_spec.rb