Sha256: e62b882931da6c32fcaee0b405a6e0e081d46dc6aab4b07e235963671849f3b6

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

require 'rubygems'
require 'bundler/setup'

require 'pry'
require 'license_finder'
require 'rspec'
require 'webmock/rspec'

ENV['test_run'] = true.to_s

Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each do |file|
  require file
end

RSpec.configure do |config|
  config.mock_with :rspec
end

RSpec.configure do |config|
  config.around do |example|
    LicenseFinder::DB.transaction(rollback: :always) { example.run }
  end

  config.after(:suite) do
    ["./doc", "./elsewhere", "./test path", "./config"].each do |tmp_dir|
      FileUtils.rm_rf(tmp_dir)
    end
  end
end

module LicenseFinder
  shared_examples "it conforms to interface required by PackageSaver" do
    it { expect { subject.name }.to_not raise_error }
    it { expect { subject.version }.to_not raise_error }
    it { expect { subject.summary }.to_not raise_error }
    it { expect { subject.description }.to_not raise_error }
    it { expect { subject.homepage }.to_not raise_error }
    it { expect { subject.groups }.to_not raise_error }
    it { expect { subject.children }.to_not raise_error }
    it { expect { subject.license }.to_not raise_error }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
license_finder-1.0.1 spec/spec_helper.rb
license_finder-1.0.0.1 spec/spec_helper.rb
license_finder-1.0.0.0 spec/spec_helper.rb
license_finder-1.0.0.0-java spec/spec_helper.rb
license_finder-0.9.5.1-java spec/spec_helper.rb
license_finder-0.9.5.1 spec/spec_helper.rb
license_finder-0.9.5 spec/spec_helper.rb
license_finder-0.9.5-java spec/spec_helper.rb