From 107f41a1100a16d7e9e6f603d5f109fc075f7b8d Mon Sep 17 00:00:00 2001 From: Paul Bowsher Date: Thu, 18 Feb 2010 21:41:52 +0000 Subject: [PATCH] JS is an invalid spec Fix HTML spec --- spec/integration_spec.rb | 1 - spec/spec_helper.rb | 14 ++------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index f71413c..5eff489 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -18,7 +18,6 @@ ## Default responses (Resourceful::ACTIONS - Resourceful::MODIFYING_ACTIONS).each(&method(:should_render_html)) - Resourceful::ACTIONS.each(&method(:should_render_js)) Resourceful::ACTIONS.each(&method(:shouldnt_render_xml)) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6fd9c08..29f62aa 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -262,23 +262,13 @@ module Spec::Example::ExampleGroupMethods def should_render_html(action) it "should render HTML by default for #{action_string(action)}" do action_method(action)[action, action_params(action)] - response.should_have "Missing template things" - #response.should be_success + response.body.should include("Missing template things") response.content_type.should == 'text/html' end end - def should_render_js(action) - it "should render JS for #{action_string(action)}" do - action_method(action)[action, action_params(action, :format => 'js')] - #response.contents.should.include? "Missing template things" - #response.should be_success - response.content_type.should == 'text/javascript' - end - end - def shouldnt_render_xml(action) - it "should render XML for #{action_string(action)}" do + it "shouldn't render XML for #{action_string(action)}" do action_method(action)[action, action_params(action, :format => 'xml')] response.should_not be_success response.code.should == '406'