Skip to content

Commit

Permalink
Added 2 tests to make sure that yaml serialization is working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
John Crepezzi committed Apr 14, 2010
1 parent a15f382 commit cf39d93
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/examples/to_yaml_spec.rb
Expand Up @@ -111,5 +111,16 @@
schedule.first(10).should == schedule2.first(10)
end

it 'should have a to_yaml representation of a rule that does not contain ruby objects' do
rule = IceCube::Rule.daily.day_of_week(:monday => [1, -1]).month_of_year(:april)
rule.to_yaml.include?('object').should be false
end

it 'should have a to_yaml representation of a schedule that does not contain ruby objects' do
schedule = IceCube::Schedule.new(Time.now)
schedule.add_recurrence_rule IceCube::Rule.daily.day_of_week(:monday => [1, -1]).month_of_year(:april)
schedule.to_yaml.include?('object').should be false
puts schedule.to_yaml
end

end

0 comments on commit cf39d93

Please sign in to comment.