-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multi line attribute assignment
- Loading branch information
Showing
8 changed files
with
162 additions
and
25 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,4 +294,54 @@ | |
invoke_cucumber_step('there is a plain ruby class with the butt "pear-shaped"') | ||
end | ||
|
||
it "should allow to set attributes via doc string" do | ||
user = User.new | ||
User.stub(:new => user) | ||
|
||
invoke_cucumber_step('there is a user with these attributes:', <<-DOC_STRING) | ||
name: Jane | ||
locked: true | ||
DOC_STRING | ||
|
||
user.name.should == "Jane" | ||
user.locked.should == true | ||
end | ||
|
||
it "should allow to set attributes via additional doc string" do | ||
user = User.new | ||
User.stub(:new => user) | ||
|
||
invoke_cucumber_step('there is a user with the email "[email protected]" and these attributes:', <<-DOC_STRING) | ||
name: Jane | ||
DOC_STRING | ||
|
||
user.name.should == "Jane" | ||
user.email.should == "[email protected]" | ||
end | ||
|
||
it "should allow to set attributes via data table" do | ||
user = User.new | ||
User.stub(:new => user) | ||
|
||
invoke_cucumber_step('there is a user with these attributes:', nil, <<-DATA_TABLE) | ||
| name | Jane | | ||
| locked | true | | ||
DATA_TABLE | ||
|
||
user.name.should == "Jane" | ||
user.locked.should == true | ||
end | ||
|
||
it "should allow to set attributes via additional data table" do | ||
user = User.new | ||
User.stub(:new => user) | ||
|
||
invoke_cucumber_step('there is a user with the email "[email protected]" and these attributes:', nil, <<-DATA_TABLE) | ||
| name | Jane | | ||
DATA_TABLE | ||
|
||
user.name.should == "Jane" | ||
user.email.should == "[email protected]" | ||
end | ||
|
||
end |
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