I have the following to remove the spaces on a specific attribute. #before_validation :strip_whitespace
I have several methods that query the database if the right paramater is passed in, and am trying to find the best way to test them.
I am trying to stub authentication for a controller in rspec.When I stub the authorize method the test always passed no matter what the value I supply.
In rspec you can either create a mock or a double. These two seem to be almost the same thing and I can\'t find anything in the documentation t开发者_如何转开发hat disambiguates them.
I\'m building my first webapp on Rails 3.0.10 and trying to right my title tests in my Pages_Controller_Spec as I learned from the ruby on rails tutorial book, however even though the titles are corre
I already asked a similar question on StackOverflow, and I got a very satisfactory answer. I am trying to get good at testing Ruby on Rails applications with RSpec this time and just doing it doesn\'t
I\'m developing a custom engine using this setup. I\'ve created the engine with rails plugin new MyEngine --full
So I have this spec describe \"visit /signup\" do before(:each) do get signup_path end it \"has an email input field\" do
I have code in my model (RoR 3.0.x) that is more or less like this: class Message after_create :notify protected
In my routes file I have: resources :subscription, :only => [:show], :constraints => {:protocol =>开发者_如何学JAVA \"https\"}