diff options
Diffstat (limited to 'spec/bundler/dsl_spec.rb')
-rw-r--r-- | spec/bundler/dsl_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb index 080723ac83..270ebe9680 100644 --- a/spec/bundler/dsl_spec.rb +++ b/spec/bundler/dsl_spec.rb @@ -110,6 +110,11 @@ RSpec.describe Bundler::Dsl do to raise_error(Bundler::GemfileError, /is not a valid platform/) end + it "rejects empty gem name" do + expect { subject.gem("") }. + to raise_error(Bundler::GemfileError, /an empty gem name is not valid/) + end + it "rejects with a leading space in the name" do expect { subject.gem(" foo") }. to raise_error(Bundler::GemfileError, /' foo' is not a valid gem name because it contains whitespace/) |