spec/lib/results_spec.rb in picky-3.0.0.pre4 vs spec/lib/results_spec.rb in picky-3.0.0.pre5
- old
+ new
@@ -58,26 +58,26 @@
describe 'to_json' do
before(:each) do
@results = described_class.new
end
it 'should do it correctly' do
- @results.stub! :serialize => :serialized
+ @results.stub! :to_hash => :serialized
@results.to_json.should == '"serialized"'
end
end
- describe 'serialize' do
+ describe 'to_hash' do
before(:each) do
@allocations = stub :allocations, :process! => nil, :to_result => :allocations, :total => :some_total
@results = described_class.new :some_results_amount, :some_offset, @allocations
@results.duration = :some_duration
end
it 'should do it correctly' do
@results.prepare!
- @results.serialize.should == { :allocations => :allocations, :offset => :some_offset, :duration => :some_duration, :total => :some_total }
+ @results.to_hash.should == { :allocations => :allocations, :offset => :some_offset, :duration => :some_duration, :total => :some_total }
end
end
describe "accessors" do
before(:each) do
\ No newline at end of file