diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-07-25 18:35:48 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-07-30 16:08:32 +0300 |
commit | 628ff2cf173f9dd9cac437991084b4507830154c (patch) | |
tree | 3e8ce92bab42e98f6afbb4f4466895caa097c673 /spec | |
parent | f6ae53bbfc8e08114e88a4a7f43ca11398114bf9 (diff) |
Use anonymous class in base_command_spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/kubernetes/helm/base_command_spec.rb | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/spec/lib/gitlab/kubernetes/helm/base_command_spec.rb b/spec/lib/gitlab/kubernetes/helm/base_command_spec.rb index 3dcb48f4869..d50616e95e8 100644 --- a/spec/lib/gitlab/kubernetes/helm/base_command_spec.rb +++ b/spec/lib/gitlab/kubernetes/helm/base_command_spec.rb @@ -1,21 +1,27 @@ require 'spec_helper' -class TestClass - include Gitlab::Kubernetes::Helm::BaseCommand - def name - "test-class-name" +describe Gitlab::Kubernetes::Helm::BaseCommand do + let(:application) { create(:clusters_applications_helm) } + let(:test_class) do + Class.new do + include Gitlab::Kubernetes::Helm::BaseCommand + + def name + "test-class-name" + end + + def files + { + some: 'value' + } + end + end end - def files - { - some: 'value' - } + let(:base_command) do + test_class.new end -end -describe Gitlab::Kubernetes::Helm::BaseCommand do - let(:application) { create(:clusters_applications_helm) } - let(:base_command) { TestClass.new } subject { base_command } it_behaves_like 'helm commands' do |