From 5b45b009e3ee3eb248f5ac96b43582823407f435 Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Wed, 30 Apr 2008 08:27:45 +0300 Subject: [PATCH] fix old specs with unnamed metas [#28 state:resolved] --- spec/lib/strokedb/sync/diff_spec.rb | 3 +-- spec/lib/strokedb/sync/slot_diff_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/lib/strokedb/sync/diff_spec.rb b/spec/lib/strokedb/sync/diff_spec.rb index 4658e3ab..cdf16b7f 100644 --- a/spec/lib/strokedb/sync/diff_spec.rb +++ b/spec/lib/strokedb/sync/diff_spec.rb @@ -96,8 +96,7 @@ Slot1Diff.should_receive(:diff).with("abcdef","abcdef1").any_number_of_times.and_return("1") Slot1Diff.should_receive(:patch).with("abcdef","1").any_number_of_times.and_return("abcdef1") - # FIXME: meta without a name! - @meta = Document.create! :diff_strategy_slot1 => strategy # TODO: fix this spec, it willn't care if I say strategy_slot1 + @meta = Document.create! :name => 'SomeSpecialMeta', :diff_strategy_slot1 => strategy # TODO: fix this spec, it willn't care if I say strategy_slot1 @from = Document.create! :slot1 => "abcdef", :meta => @meta @to = Document.create! :slot1 => "abcdef1", :meta => @meta diff --git a/spec/lib/strokedb/sync/slot_diff_spec.rb b/spec/lib/strokedb/sync/slot_diff_spec.rb index eeb2d6fd..f6d6087c 100644 --- a/spec/lib/strokedb/sync/slot_diff_spec.rb +++ b/spec/lib/strokedb/sync/slot_diff_spec.rb @@ -8,7 +8,7 @@ Slot1Diff = Class.new(SlotDiffStrategy) Slot1Diff.should_receive(:diff).with(1,2).and_return(3) - @meta = Document.create! :diff_strategy_slot1 => 'slot_1_diff' + @meta = Document.create! :diff_strategy_slot1 => 'slot_1_diff', :name => "Slot1DiffMeta" @from = Document.create! :slot1 => 1, :meta => @meta @to = Document.create! :slot1 => 2, :meta => @meta @@ -29,7 +29,7 @@ @store = setup_default_store Object.send!(:remove_const,'Slot1Diff') if defined?(Slot1Diff) - @meta = Document.create! :diff_strategy_slot1 => 'slot_1_diff' + @meta = Document.create! :diff_strategy_slot1 => 'slot_1_diff', :name => "Slot1DiffMeta" @from = Document.create! :slot1 => 1, :meta => @meta @to = Document.create! :slot1 => 2, :meta => @meta @@ -51,7 +51,7 @@ Slot1Diff = Class.new - @meta = Document.create! :diff_strategy_slot1 => 'slot_1_diff' + @meta = Document.create! :diff_strategy_slot1 => 'slot_1_diff', :name => "Slot1DiffMeta" @from = Document.create! :slot1 => 1, :meta => @meta @to = Document.create! :slot1 => 2, :meta => @meta