Just started to learn the basics of rspec.
Before doing anything serious I wanted to get to know the set-up and
commands to run tests.
I'm pretty sure that is all OK now with respect to gems and my test
environment. It will run the tests but it seems to get the wrong
answer.

I have a controller with  a single action 'index'.

I wanted to observe a failing test so I created a super-simple test as
follows:

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Test4Controller do

describe "responding to show" do
  it "show should be successful" do
      get :show
      response.should be_success
    end
 end
end

There is NO action called 'show' in my controller but the test passes
successfully. On running the app the response code is 404 not 200.
Could anyone please explain what's happening.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to