forked from ginty/cranky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix to debug method not returning created object, added test cove…
…rage and fixed
- Loading branch information
Ginty
committed
Aug 22, 2010
1 parent
cf1b814
commit abc1886
Showing
3 changed files
with
17 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
|
||
class TestClass | ||
attr_accessor :valid | ||
|
||
def save | ||
@saved = true | ||
end | ||
|
@@ -13,7 +15,7 @@ def saved? | |
end | ||
|
||
def valid? | ||
false | ||
@valid | ||
end | ||
|
||
def errors | ||
|
@@ -53,6 +55,7 @@ def user_manually | |
u.unique = "value#{n}" | ||
u.email = "[email protected]" | ||
u.address = Factory.build(:address) | ||
u.valid = true | ||
u | ||
end | ||
|
||
|
@@ -62,7 +65,8 @@ def user_by_define | |
:role => :user, | ||
:unique => "value#{n}", | ||
:email => "[email protected]", | ||
:address => Factory.create(:address) | ||
:address => Factory.create(:address), | ||
:valid => true | ||
u.argument_received = true if options[:argument_supplied] | ||
u | ||
end | ||
|
@@ -78,7 +82,8 @@ def admin_by_define | |
|
||
def address | ||
define :address => "25 Wisteria Lane", | ||
:city => "New York" | ||
:city => "New York", | ||
:valid => true | ||
end | ||
|
||
end | ||
|