Retain Default values in the tables

Hi All,

I am new to Rspec.

Below is my requirement.

I have 2 tables

Settings:

name

value

Users:

name

email

Now i am going to write a rspec to list all the users in the users table with the consumer_controller_spec.rb

The problem i face here is that i have a before filter in my controller (app/controllers/consumers_controller.rb) file so that it check if the name is “abc” & then only executes the list method.

Whenever I run the rspec it deletes all the records in the tables & hence i am unable to proceed the rspec testing…

Hope the explanation i have explained above is clear.

Kindly help me to proceed further.Thanks in advance.

Regards,

Natchiar.V

This mailing list is for the development of the Rails core source code. Perhaps post your question in the Ruby on Rails Talk group (http://groups.google.com/group/rubyonrails-talk) or better yet the RSpec group (http://groups.google.com/group/rspec), as your problem requires a better understanding RSpec and the before(:each) and before(:all) methods.

-Steve @jangosteve