http://dl.dropbox.com/u/15024055/CloudShot/shot_15032012_232654.png
if i write the test like this its working just fine it passes green [code] it "should have the right title" do get 'view' response.should have_selector('title', :content => "View Snippets") end [/code] but for the same page this other format is red, they shold test for the same thing? [code] require 'spec_helper' describe "SnippetsPages" do describe "New Snippet pages" do before { get 'new'} it { should have_selector('h1', content: 'New') } it { should have_selector('title', content: full_title('New Snippet')) } end describe "View Snippets pages" do before { get 'view' } it { should have_selector('h1', content: 'View') } it { should have_selector('title', content: full_title('View Snippets')) } end end [/code] I can't understand why my tests is not working Here is the helper: [code] def full_title(page_title) base_title = "Sample App" if page_title.empty? base_title else page_title end end [/code] http://stackoverflow.com/questions/9728983/rails-tests-failing/9730133#9730133 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.