Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specs: add specs for StoryRepository
Also adjust the way that factories are required and introduce a `next_id` helper. There are still some untested methods in StoryRepository which I will continue to work on in followups.
- Loading branch information
Showing
4 changed files
with
64 additions
and
9 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,15 @@ | ||
require_relative "factories/feed_factory" | ||
require_relative "factories/story_factory" | ||
require_relative "factories/user_factory" | ||
require_relative "factories/group_factory" | ||
require_relative "factories/feeds" | ||
require_relative "factories/groups" | ||
require_relative "factories/stories" | ||
require_relative "factories/users" | ||
|
||
module Factories | ||
def next_id | ||
@next_id ||= 0 | ||
@next_id += 1 | ||
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
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