adds a spec to test invocation of multiple callbacks

pull/1081/head
Martin Linkhorst 11 years ago
parent dda5226dff
commit 7a29578dfd
  1. 6
      spec/models/setting_spec.rb

@ -115,6 +115,12 @@ describe Setting do
end
it "calls multiple callbacks when a setting is set" do
Setting.register_callback(:notified_events, &callback)
Setting.notified_events = [:some_event]
expect(collector.size).to eq 2
end
it "calls callbacks every time a setting is set" do
Setting.notified_events = [:some_event]
Setting.notified_events = [:some_event]
expect(collector.size).to eq 2

Loading…
Cancel
Save