Skip to content

Commit

Permalink
Auto corrected by following Lint Ruby Parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
Awesome Code committed Jan 9, 2021
1 parent 6f35b6f commit 11fb486
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/synvert/core/configuration_spec.rb
Expand Up @@ -4,7 +4,7 @@ module Synvert::Core
describe Configuration do
it 'sets / gets' do
Configuration.instance.set :key, 'value'
expect(Configuration.instance.get :key).to eq 'value'
expect(Configuration.instance.get(:key)).to eq 'value'
end
end
end
4 changes: 2 additions & 2 deletions spec/synvert/core/rewriter/instance_spec.rb
Expand Up @@ -205,7 +205,7 @@ module Synvert::Core
instance.instance_variable_set :@actions, [action1, action2, action3]
conflict_actions = instance.send(:get_conflict_actions)
expect(conflict_actions).to eq []
expect(instance.instance_variable_get :@actions).to eq [action1, action2, action3]
expect(instance.instance_variable_get(:@actions)).to eq [action1, action2, action3]
end

it "has no conflict" do
Expand All @@ -216,7 +216,7 @@ module Synvert::Core
instance.instance_variable_set :@actions, [action1, action2, action3]
conflict_actions = instance.send(:get_conflict_actions)
expect(conflict_actions).to eq [action2, action1]
expect(instance.instance_variable_get :@actions).to eq [action3]
expect(instance.instance_variable_get(:@actions)).to eq [action3]
end
end

Expand Down
10 changes: 5 additions & 5 deletions spec/synvert/core/rewriter_spec.rb
Expand Up @@ -92,7 +92,7 @@ module Synvert::Core
add_file 'foo.bar', 'FooBar'
end
rewriter.process
expect(File.read './foo.bar').to eq 'FooBar'
expect(File.read('./foo.bar')).to eq 'FooBar'
FileUtils.rm './foo.bar'
end

Expand All @@ -112,15 +112,15 @@ module Synvert::Core
remove_file 'foo.bar'
end
rewriter.process
expect(File.exist? './foo.bar').to be_falsey
expect(File.exist?('./foo.bar')).to be_falsey
end

it 'does nothing if file not exist' do
rewriter = Rewriter.new 'group', 'rewriter2' do
remove_file 'foo.bar'
end
rewriter.process
expect(File.exist? './foo.bar').to be_falsey
expect(File.exist?('./foo.bar')).to be_falsey
end

it 'does nothing in sandbox mode' do
Expand Down Expand Up @@ -204,11 +204,11 @@ module Synvert::Core
context "exist?" do
it 'returns true if rewriter exists' do
Rewriter.new 'group', 'rewriter'
expect(Rewriter.exist? 'group', 'rewriter').to be_truthy
expect(Rewriter.exist?('group', 'rewriter')).to be_truthy
end

it 'returns false if rewriter does not exist' do
expect(Rewriter.exist? 'group', 'rewriter').to be_falsey
expect(Rewriter.exist?('group', 'rewriter')).to be_falsey
end
end

Expand Down

0 comments on commit 11fb486

Please sign in to comment.