Permalink
Browse files

whitespace

  • Loading branch information...
1 parent 74c8456 commit 8ce0de68d749eaa3f4023dfe86ec5e0881cdf9ec @saturnflyer saturnflyer committed Feb 19, 2013
Showing with 9 additions and 9 deletions.
  1. +9 −9 spec/matchers/render_matcher.rb
@@ -1,12 +1,12 @@
module Spec
module Rails
module Matchers
-
+
class RenderTags
def initialize(content = nil)
@content = content
end
-
+
def matches?(page)
@actual = render_content_with_page(@content, page)
if @expected.kind_of?(Regexp)
@@ -28,12 +28,12 @@ def matches?(page)
false
end
end
-
+
def failure_message
- action = case
+ action = case
when @expected
"render as #{@expected.inspect}"
- when @not_matching
+ when @not_matching
"render but not match #{@not_matching.inspect}"
else
"render and match #{@matching.inspect}"
@@ -109,25 +109,25 @@ def render_content_with_page(tag_content, page)
page.send(:parse, tag_content)
end
end
-
+
def test_host
"testhost.tld"
end
end
-
+
# page.should render(input).as(output)
# page.should render(input).as(output).on(url)
# page.should render(input).matching(/hello world/)
# page.should render(input).with_error(message)
def render(input)
RenderTags.new(input)
end
-
+
# page.should render_as(output)
def render_as(output)
RenderTags.new.as(output)
end
-
+
end
end
end

0 comments on commit 8ce0de6

Please sign in to comment.