Skip to content

Commit

Permalink
fix old specs with unnamed metas [#28 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Apr 30, 2008
1 parent 7baf51d commit 5b45b00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions spec/lib/strokedb/sync/diff_spec.rb
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/strokedb/sync/slot_diff_spec.rb
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5b45b00

Please sign in to comment.