Permalink
Browse files

Style changes for last commit.

  • Loading branch information...
1 parent a62c376 commit b6069f736d4160068574461677e945585bc95a3d Tammer Saleh committed Sep 20, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/shoulda/controller/macros.rb
@@ -109,11 +109,11 @@ def should_not_set_the_flash
def should_assign_to(*names)
opts = names.extract_options!
names.each do |name|
- should "assign @#{name}" do
+ test_name = "assign @#{name}"
+ test_name << " as #{opts[:class]}" if opts[:class]
+ should test_name do
assert assigns(name.to_sym), "The action isn't assigning to @#{name}"
- unless opts[:class].nil?
- assert_kind_of opts[:class], assigns(name.to_sym)
- end
+ assert_kind_of opts[:class], assigns(name.to_sym) if opts[:class]
end
end
end

0 comments on commit b6069f7

Please sign in to comment.