Displaying 1 result from an estimated 1 matches for "migration_graph".
2008 May 18
2
Using Hash to mock classes that respond to :
...all I''m interested in stubbing is that method, then instead of
using a mock I just create a hash. (Similarly, you could create an
array when you are testing an Enumerable object.)
Example from code I just worked on, where uses MigrationGraph#[] looks
up graph vertices by name:
@migration_graph = {
# "name" => vertex
"changeset 1 migration 1" => @migration_a,
"changeset 1 migration 2" => @migration_b,
"changeset 2 migration 1" => @migration_c,
"changeset 2 migration 2" => @migration_d
}
What I...