Skip to content

Commit

Permalink
Fix style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Mar 9, 2012
1 parent 0e0339e commit fd4aa53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 11 additions & 3 deletions lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -103,12 +103,20 @@ def flash_description
end end


def expected_flash_invocation def expected_flash_invocation
"flash#{".now" if @now}#{"[:%s]" % @key if @key}" now = ""
end key = ""


end if @now
now = ".now"
end


if @key
key = "[:#{@key}]"
end


"flash#{now}#{key}"
end
end
end end
end end
end end
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
it "should reject setting a different pattern" do it "should reject setting a different pattern" do
@controller.should_not set_the_flash[:notice].to(/other/) @controller.should_not set_the_flash[:notice].to(/other/)
end end

end end


context "a controller that sets multiple flash messages" do context "a controller that sets multiple flash messages" do
Expand Down

0 comments on commit fd4aa53

Please sign in to comment.