Skip to content

Commit

Permalink
Remove repetitive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre authored and mergify[bot] committed Sep 23, 2020
1 parent 92f6745 commit 0c89003
Showing 1 changed file with 0 additions and 144 deletions.
144 changes: 0 additions & 144 deletions spec/rubocop/ast/send_node_spec.rb
Expand Up @@ -120,78 +120,6 @@ module Foo
it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is a bare `private`' do
let(:source) do
<<~RUBY
module Foo
private
end
RUBY
end

it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is a non-bare `private`' do
let(:source) do
<<~RUBY
module Foo
private :foo
end
RUBY
end

it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is a bare `protected`' do
let(:source) do
<<~RUBY
module Foo
protected
end
RUBY
end

it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is a non-bare `protected`' do
let(:source) do
<<~RUBY
module Foo
protected :foo
end
RUBY
end

it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is a bare `public`' do
let(:source) do
<<~RUBY
module Foo
public
end
RUBY
end

it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is a non-bare `public`' do
let(:source) do
<<~RUBY
module Foo
public :foo
end
RUBY
end

it { expect(send_node.access_modifier?).to be_truthy }
end

context 'when node is not an access modifier' do
let(:source) do
<<~RUBY
Expand Down Expand Up @@ -220,42 +148,6 @@ module Foo
it { expect(send_node.bare_access_modifier?).to be_truthy }
end

context 'when node is a bare `private`' do
let(:source) do
<<~RUBY
module Foo
private
end
RUBY
end

it { expect(send_node.bare_access_modifier?).to be_truthy }
end

context 'when node is a bare `protected`' do
let(:source) do
<<~RUBY
module Foo
protected
end
RUBY
end

it { expect(send_node.bare_access_modifier?).to be_truthy }
end

context 'when node is a bare `public`' do
let(:source) do
<<~RUBY
module Foo
public
end
RUBY
end

it { expect(send_node.bare_access_modifier?).to be_truthy }
end

context 'when node has an argument' do
let(:source) do
<<~RUBY
Expand Down Expand Up @@ -296,42 +188,6 @@ module Foo
it { expect(send_node.non_bare_access_modifier?).to be_truthy }
end

context 'when node is a non-bare `private`' do
let(:source) do
<<~RUBY
module Foo
private :foo
end
RUBY
end

it { expect(send_node.non_bare_access_modifier?).to be_truthy }
end

context 'when node is a non-bare `protected`' do
let(:source) do
<<~RUBY
module Foo
protected :foo
end
RUBY
end

it { expect(send_node.non_bare_access_modifier?).to be_truthy }
end

context 'when node is a non-bare `public`' do
let(:source) do
<<~RUBY
module Foo
public :foo
end
RUBY
end

it { expect(send_node.non_bare_access_modifier?).to be_truthy }
end

context 'when node does not have an argument' do
let(:source) do
<<~RUBY
Expand Down

0 comments on commit 0c89003

Please sign in to comment.