Skip to content
Browse files

Fix wrong indentation

  • Loading branch information...
1 parent b2b8083 commit 5fd9f397fbe90f87551e0ec80604d392dcc9de2e @jhchabran jhchabran committed Jul 21, 2012
Showing with 14 additions and 7 deletions.
  1. +14 −7 spec/vintner/representer_spec.rb
View
21 spec/vintner/representer_spec.rb
@@ -118,16 +118,23 @@ class Dummy
end
end
end
- end
- it "should export json" do
- hash = {:meta=>{:tile => "test"}, :position => {:x => 4, :y => 5}}
+ it "should export json" do
+ hash = {:meta=>{:tile => "test"}, :position => {:x => 4, :y => 5}}
+
+ model = Struct.new(:formatted_title, :position).new("test", :x => 4, :y => 5)
+ Dummy.export(model).should ==(hash.to_json)
+ end
+
+ it "should import json" do
+ hash = {:meta=>{:tile => "test"}, :position => {:x => 4, :y => 5}}
- model = Struct.new(:formatted_title, :position).new
+ model = Struct.new(:formatted_title, :position).new
- Dummy.import(model, hash.to_json).formatted_title.should ==("test")
- Dummy.import(model, hash.to_json).position_x.should ==(4)
- Dummy.import(model, hash.to_json).position_y.should ==(5)
+ Dummy.import(model, hash.to_json).formatted_title.should ==("test")
+ Dummy.import(model, hash.to_json).position_x.should ==(4)
+ Dummy.import(model, hash.to_json).position_y.should ==(5)
+ end
end
end
end

0 comments on commit 5fd9f39

Please sign in to comment.
Something went wrong with that request. Please try again.