Sha256: 10aa03a1e4e0b4230df54f25dede0f8d72a7c806e8a57359bda582c763c0f2fe

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'
require 'natives/gemfile_viewer'

describe Natives::GemfileViewer do
  describe "#packages" do
    it "list all gems specified in gemfile" do
      gemfile_path = File.join(fixture_path, "Gemfile.empty")
      gemfile = Natives::GemfileViewer.new(gemfile_path)
      expect(gemfile.gem_names).to eq(['bundler'])
    end

    it "raises error when failed to list gems in gemfile" do
      gemfile = Natives::GemfileViewer.new("gemfile_not_exist")
      expect { gemfile.gem_names }.to raise_error
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
natives-0.5.2 spec/natives/gemfile_viewer_spec.rb
natives-0.5.1 spec/natives/gemfile_viewer_spec.rb
natives-0.5.0 spec/natives/gemfile_viewer_spec.rb