Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend existing functionality and add string conversion.
- Loading branch information
Showing
4 changed files
with
132 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Feature: String conversion | ||
As a ruby-tools-mode user | ||
I want to turn single quote strings to double quote string and reverse | ||
|
||
Scenario: Turn single quote string to double quote string | ||
When I insert "'foo'" | ||
And I turn on ruby-mode | ||
And I place the cursor on the string "foo" | ||
And I press "C-"" | ||
Then I should see ""foo"" | ||
Scenario: Turn single quote string to double quote string in method call | ||
When I insert "foo('bar')" | ||
And I turn on ruby-mode | ||
And I place the cursor on the string "bar" | ||
And I press "C-"" | ||
Then I should see "foo("bar")" | ||
|
||
Scenario: Do not turn to single quote string when on single quote string | ||
When I insert "'foo'" | ||
And I turn on ruby-mode | ||
And I place the cursor on the string "foo" | ||
And I press "C-'" | ||
Then I should see "'foo'" | ||
|
||
Scenario: Turn double quote string to single quote string | ||
When I insert ""foo"" | ||
And I turn on ruby-mode | ||
And I place the cursor on the string "foo" | ||
And I press "C-'" | ||
Then I should see "'foo'" | ||
|
||
Scenario: Turn double quote string to single quote string in method call | ||
When I insert "foo("bar")" | ||
And I turn on ruby-mode | ||
And I place the cursor on the string "bar" | ||
And I press "C-'" | ||
Then I should see "foo('bar')" | ||
|
||
Scenario: Do not turn to double quote string when on double quote string | ||
When I insert ""foo"" | ||
And I turn on ruby-mode | ||
And I place the cursor on the string "foo" | ||
And I press "C-"" | ||
Then I should see ""foo"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters