spec/coercions/test_dup.rb in myrrha-1.0.0 vs spec/coercions/test_dup.rb in myrrha-1.1.0
- old
+ new
@@ -14,8 +14,15 @@
r.coercion String, Float, lambda{|s,t| Float(s)}
end
dupped.coerce("12", Float).should eql(12.0)
lambda{ rules.coerce("12", Float) }.should raise_error(Myrrha::Error)
end
+
+ it "should not forget main_target_domain" do
+ rules = Coercions.new do |r|
+ r.main_target_domain = Integer
+ end
+ rules.dup.main_target_domain.should eql(Integer)
+ end
end
end
\ No newline at end of file