Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
implement ok? spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed May 22, 2012
1 parent 835d90f commit 56c5507
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/glorify_spec.rb
Expand Up @@ -12,7 +12,7 @@
end
expected = "<h1>a sip of glory</h1>"
get('/')
assert last_response.ok?
assert ok?
assert_equal expected, body
end

Expand All @@ -22,7 +22,7 @@
end
expected = "<p><code>puts &quot;Hello, world!&quot;</code></p>"
get('/')
assert last_response.ok?
assert ok?
assert_equal expected, body
end

Expand Down
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -26,4 +26,8 @@ def app
def body
last_response.body.gsub(/\n/,'')
end

def ok?
last_response.ok?
end
end

0 comments on commit 56c5507

Please sign in to comment.