search for: termscontroller

Displaying 2 results from an estimated 2 matches for "termscontroller".

Did you mean: fermscontroller
2007 Apr 09
7
RCov results seem to include the spec files
I saw the RCov page at http://rspec.rubyforge.org/tools/rcov.html and decided to add it to my project. My rakefile looks like this: require "rake" require "spec/rake/spectask" desc "Run all specs with RCov" Spec::Rake::SpecTask.new("spec:rcov") do |t| t.spec_files = FileList["spec/**/*_spec.rb"] t.rcov = true end When I run rake spec:rcov,
2007 Mar 27
2
mocking/stubbing newbie questions
...do @user = mock_model(User) User.stub!(:find).and_return(@user) end def do_get get :index, :user_id => 1 end it "should find all terms associated with the user" do User.should_receive(:find).with("1") end end the controller code: class TermsController < ApplicationController def index User.find(1) end end the spec results: 1) Spec::Mocks::MockExpectationError in ''GET /users/1/terms should find all terms associated with the user'' User expected :find with ("1") once, but received it 0 times ./spec/con...