Topic: first steps: rspec and cucumber

I'm just starting out with cucumber and rspec an i have a question that might sound silly to more advanced developers:

I'm writing a cucumber feature that manages the list of users. In the feature i specify that only ACTIVE users need to be shown.

What i'm unsure about is the fact that on the feature i specify that un-activated users are not shown but what happens if i simply forgot to include that scope(activated) in the actual controller.

So in the controller i have @users = Users.all(it should have been Users.activated) but in the cucumber tests i mentioned i only want activated users and i create the users in the tests in that way.

How can i test the actual controller?

Re: first steps: rspec and cucumber

I would say don't test the controller, some may disagree with me, just do your cucumber test. The best way to achieve the test to make sure that you are only showing active users is to make two users in your test setup, and then have expectations to test which are shown, I would use:

Then I should not see "User who is inactive"
And I should see "User who is active"

Then if you have the wrong code in your controller the test will fail.