summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorChris Keele <dev@chriskeele.com>2018-01-19 22:37:54 -0800
committerChris Keele <dev@chriskeele.com>2018-01-19 22:37:54 -0800
commit748255034ca1c82e8bcd86c9736efec870d915eb (patch)
tree34c141b62ccb3626e2b225d3942183c9bfcebacb /spec
parent69e528349fba9ee7ad12182a3bc705a4876e5319 (diff)
downloadbundler-748255034ca1c82e8bcd86c9736efec870d915eb.tar.gz
Simplify error class stuff.
Diffstat (limited to 'spec')
-rw-r--r--spec/commands/newgem_spec.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index cfc8284585..f4642787cb 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -554,38 +554,6 @@ RSpec.describe "bundle gem" do
end
end
- context "--error-class flag set" do
- context "with valid error class name" do
- it "generates a gem skeleton with error subclassing given base class" do
- execute_bundle_gem("test_gem", "--error-class RuntimeError")
- expect(bundled_app("test_gem/lib/test_gem.rb").read).to include("< RuntimeError")
- end
- end
-
- context "with non-error class name" do
- it "fails to generate a gem skeleton" do
- expect do
- execute_bundle_gem("test_gem", "--error-class Enumerable")
- end.to raise_error(RuntimeError, /Invalid error class/)
- end
- end
-
- context "with invalid class name" do
- it "fails to generate a gem skeleton" do
- expect do
- execute_bundle_gem("test_gem", "--error-class qpwoeiryt")
- end.to raise_error(RuntimeError, /Invalid class name/)
- end
- end
- end
-
- context "--no-error-class flag set" do
- it "generates a gem skeleton without error subclass" do
- execute_bundle_gem("test_gem", "--no-error-class")
- expect(bundled_app("test_gem/lib/test_gem.rb").read).to_not include("class Error")
- end
- end
-
context "gem naming with dashed" do
let(:gem_name) { "test-gem" }