Sha256: f12dd1402be40eec146df9ea08767099024f1145640ea6888b33b8d1c43d7d8b

Contents?: true

Size: 523 Bytes

Versions: 3

Compression:

Stored size: 523 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 = "spec/fixtures/Gemfile.empty"
      gemfile = Natives::GemfileViewer.new(gemfile_path)
      expect(gemfile.packages).to eq(['bundler'])
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
natives-0.4.1 spec/natives/gemfile_viewer_spec.rb
natives-0.4.0 spec/natives/gemfile_viewer_spec.rb
natives-0.3.0 spec/natives/gemfile_viewer_spec.rb