Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Coding style.

  • Loading branch information...
commit 858af82c8b0627f6621ad9fcbcfdb26f7118cd4a 1 parent 60506d4
Graham Ashton authored May 09, 2012

Showing 1 changed file with 4 additions and 8 deletions. Show diff stats Hide diff stats

  1. 12  spec/page_spec.rb
12  spec/page_spec.rb
@@ -27,8 +27,7 @@
27 27
     it "should link to top level menu items" do
28 28
       do_get
29 29
       body.should have_tag(
30  
-        "ul.menu a[@href$=#{@category.abspath}]",
31  
-                           Regexp.new(@category.link_text))
  30
+          "ul.menu a[@href$=#{@category.abspath}]", /#{@category.link_text}/)
32 31
     end
33 32
   end
34 33
   
@@ -75,8 +74,7 @@
75 74
         :ext => :haml,
76 75
         :content => @default_homepage_content)
77 76
       do_get
78  
-      body.should have_tag("ul.menu a[@href=http://example.org/]",
79  
-                           Regexp.new('Home'))
  77
+      body.should have_tag("ul.menu a[@href=http://example.org/]", /Home/)
80 78
     end
81 79
     
82 80
     it "should use the heading if it exists" do
@@ -86,8 +84,7 @@
86 84
         :heading => 'My heading',
87 85
         :content => @default_homepage_content)
88 86
       do_get
89  
-      body.should have_tag("ul.menu a[@href=http://example.org/",
90  
-                           Regexp.new('My heading'))
  87
+      body.should have_tag("ul.menu a[@href=http://example.org/", /My heading/)
91 88
     end
92 89
 
93 90
     it "should use the link text if specified" do
@@ -98,8 +95,7 @@
98 95
         :content => @default_homepage_content,
99 96
         :metadata => {'link text'=>'My link text'})
100 97
       do_get
101  
-      body.should have_tag("ul.menu a[@href=http://example.org/", 
102  
-                           Regexp.new('My link text'))
  98
+      body.should have_tag("ul.menu a[@href=http://example.org/", /My link text/)
103 99
     end
104 100
   end
105 101
 end

0 notes on commit 858af82

Please sign in to comment.
Something went wrong with that request. Please try again.