Sha256: d0583b7dd3feba3783a509d9ed3696d8262536d98392cddf71d8743ac2daa4c6
Contents?: true
Size: 789 Bytes
Versions: 1
Compression:
Stored size: 789 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') def mock_report(stubs = {}) mock_model(Report, {:id => 1, :name => 'some report', :description => 'aoeu'}.merge(stubs)) end describe "reports#index" do it "Shows a list of given reports" do view.should_receive(:reports).at_least(1).times.and_return([mock_report]) view.stub(:custom_reports => []) render :template => 'reports/index' rendered.should have_selector("td:contains('some report')") end it "if no reports are present, it tells the user so" do view.should_receive(:reports).at_least(1).times.and_return([]) view.stub(:custom_reports => []) render :template => 'reports/index' rendered.should contain("no canned") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
report_ui-0.0.1.alpha | spec/views/reports/index.html.haml_spec.rb |