Displaying 1 result from an estimated 1 matches for "bytes_transf".
2008 May 08
2
Testing render :text without has_text
...end
end
And here''s the test:
describe StatsController do
before :each do
@query_params = { :foo => :bar }
end
it "should return a demarshallable string of the reports" do
reports = [
StatisticsReport.new(:date => nil),
StatisticsReport.new(:bytes_transferred => 0)
]
StatisticsReporter.should_receive(:query).and_return reports
get :query, :query_params => @query_params
# PROBLEM CODE (the equality test needs tweaking, but you get the
idea)
Marshal.load(response.what_goes_here?).should == reports
end
end
(This code...