Skip to content

Commit

Permalink
JS is an invalid spec
Browse files Browse the repository at this point in the history
Fix HTML spec
  • Loading branch information
boffbowsh committed Feb 18, 2010
1 parent a23f82c commit 107f41a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion spec/integration_spec.rb
Expand Up @@ -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))


Expand Down
14 changes: 2 additions & 12 deletions spec/spec_helper.rb
Expand Up @@ -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'
Expand Down

0 comments on commit 107f41a

Please sign in to comment.