diff --git a/lib/degem/gemfile.rb b/lib/degem/gemfile.rb index d0e3267..79fbed0 100644 --- a/lib/degem/gemfile.rb +++ b/lib/degem/gemfile.rb @@ -7,7 +7,7 @@ def initialize(dsl) end def rubygems - @rubygems ||= gemfile_dependencies + gemspec_dependencies + @rubygems ||= (gemfile_dependencies + gemspec_dependencies).uniq end def rails? diff --git a/test/test_parse_gemfile.rb b/test/test_parse_gemfile.rb index 1def0f4..1ddccbe 100644 --- a/test/test_parse_gemfile.rb +++ b/test/test_parse_gemfile.rb @@ -42,6 +42,7 @@ def test_it_returns_the_parsed_gemfile_including_its_gemspec spec.files = Dir.glob("lib/**/*") + Dir.glob("exe/*") spec.authors = ["Riccardo Odone"] spec.add_dependency "baz", "~> 1.0" + spec.add_development_dependency "foobar", "~> 1.0" end CONTENT @@ -50,7 +51,7 @@ def test_it_returns_the_parsed_gemfile_including_its_gemspec File.write(gemfile_path, "\ngemspec", mode: "a") with_file(path: File.join("app", "bar.gemspec"), content: gemspec) do actual = Degem::ParseGemfile.new.call(gemfile_path) - assert_array %w[foo bar baz], actual.rubygems.map(&:name) + assert_array %w[foo bar baz foobar], actual.rubygems.map(&:name) end end end