Skip to content

Commit 4537f89

Browse files
committed
Test classes existance, not the order they appear in
1 parent 98c7231 commit 4537f89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/unit/views/tabbed_navigation_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080

8181
it "should add the 'current' and 'has_nested' classes to the li and 'current' to the sub li" do
8282
assigns[:current_tab] = "Reports/A Sub Reports"
83-
html.should have_tag("li", :attributes => { :id => "reports", :class => "current has_nested" })
83+
html.should have_tag("li", :attributes => { :id => "reports", :class => /current/ })
84+
html.should have_tag("li", :attributes => { :id => "reports", :class => /has_nested/ })
8485
html.should have_tag("li", :attributes => { :id => "a_sub_reports", :class => "current" })
8586
end
8687

0 commit comments

Comments
 (0)