Permalink
Browse files

Coding style.

  • Loading branch information...
1 parent 60506d4 commit 858af82c8b0627f6621ad9fcbcfdb26f7118cd4a @gma gma committed May 9, 2012
Showing with 4 additions and 8 deletions.
  1. +4 −8 spec/page_spec.rb
View
@@ -27,8 +27,7 @@
it "should link to top level menu items" do
do_get
body.should have_tag(
- "ul.menu a[@href$=#{@category.abspath}]",
- Regexp.new(@category.link_text))
+ "ul.menu a[@href$=#{@category.abspath}]", /#{@category.link_text}/)
end
end
@@ -75,8 +74,7 @@
:ext => :haml,
:content => @default_homepage_content)
do_get
- body.should have_tag("ul.menu a[@href=http://example.org/]",
- Regexp.new('Home'))
+ body.should have_tag("ul.menu a[@href=http://example.org/]", /Home/)
end
it "should use the heading if it exists" do
@@ -86,8 +84,7 @@
:heading => 'My heading',
:content => @default_homepage_content)
do_get
- body.should have_tag("ul.menu a[@href=http://example.org/",
- Regexp.new('My heading'))
+ body.should have_tag("ul.menu a[@href=http://example.org/", /My heading/)
end
it "should use the link text if specified" do
@@ -98,8 +95,7 @@
:content => @default_homepage_content,
:metadata => {'link text'=>'My link text'})
do_get
- body.should have_tag("ul.menu a[@href=http://example.org/",
- Regexp.new('My link text'))
+ body.should have_tag("ul.menu a[@href=http://example.org/", /My link text/)
end
end
end

0 comments on commit 858af82

Please sign in to comment.