Chris,
I have been burned by the serialization / de-serialization issues in delayed job before. As a matter of fact, I have a shared spec for all my job classes that makes sure that makes sure that serialization and de-serialization work fine to try to find this before shipping.
I usually have a shared example like:
shared_examples 'a job implementation' do
it 'can be serialized with Marshal' do
expect {
Marshal.load(Marshal.dump(subject))
}.to_not raise_error
end
it 'can be serialized with YAML' do
expect {
YAML.load(YAML.dump(subject))
}.to_not raise_error
end
end
And then call that from in my job class specs:
describe SomeJob do
subject { SomeJob.new(whatever) } # Ensure you are setting up correctly
it_behaves_like 'a job implementation’
# Other tests for class go here.
end
Hope this helps,
—
Ylan Segal
yl...@segal-family.com
> --
> --
> SD Ruby mailing list
>
sdr...@googlegroups.com
>
http://groups.google.com/group/sdruby
> ---
> You received this message because you are subscribed to the Google Groups "SD Ruby" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sdruby+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.