Skip to content

Commit

Permalink
indent code
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Dec 14, 2014
1 parent 6648c8c commit 1139ae6
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions features/builtins_cop.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,58 @@ Feature: Generic Builtins detection and replacement

Scenario: y2milestone() builtin call is reported as an offense
Given the original code is
"""
Builtins.y2milestone("foo")
"""
"""
Builtins.y2milestone("foo")
"""
When I check it using RuboCop::Cop::Yast::Builtins cop
Then offense "Builtin call `y2milestone` is obsolete" is found

Scenario: Builtin with explicit Yast namespace is reported as an offense
Given the original code is
"""
Yast::Builtins.y2milestone("foo")
"""
"""
Yast::Builtins.y2milestone("foo")
"""
When I check it using RuboCop::Cop::Yast::Builtins cop
Then offense "Builtin call `y2milestone` is obsolete" is found

Scenario: Builtin with explicit ::Yast namespace is reported as an offense
Given the original code is
"""
::Yast::Builtins.y2milestone("foo")
"""
"""
::Yast::Builtins.y2milestone("foo")
"""
When I check it using RuboCop::Cop::Yast::Builtins cop
Then offense "Builtin call `y2milestone` is obsolete" is found

Scenario: Builtins with ::Builtins name space are ignored
Given the original code is
"""
::Builtins.y2milestone("foo")
"""
"""
::Builtins.y2milestone("foo")
"""
When I check it using RuboCop::Cop::Yast::Builtins cop
Then the code is found correct

Scenario: Builtins in non Yast name space are ignored
Given the original code is
"""
Foo::Builtins.y2milestone("foo")
"""
"""
Foo::Builtins.y2milestone("foo")
"""
When I check it using RuboCop::Cop::Yast::Builtins cop
Then the code is found correct

Scenario: lsort(), crypt and gettext builtins are allowed
Given the original code is
"""
Builtins.lsort(["foo"])
Builtins.crypt("foo")
Builtins.dgettext("domain", "foo")
"""
"""
Builtins.lsort(["foo"])
Builtins.crypt("foo")
Builtins.dgettext("domain", "foo")
"""
When I check it using RuboCop::Cop::Yast::Builtins cop
Then the code is found correct

Scenario: Unknown builtins are kept unchanged
Given the original code is
"""
Builtins.foo()
"""
"""
Builtins.foo()
"""
When I correct it using RuboCop::Cop::Yast::Builtins cop
Then the code is unchanged

0 comments on commit 1139ae6

Please sign in to comment.