Commit 56661a84c6a57e99931b1b0080e01853df10dd83
1 parent
54a29b33
Exists in
master
and in
29 other branches
rails3: fix Box unit tests
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/box_test.rb
... | ... | @@ -11,7 +11,7 @@ class BoxTest < ActiveSupport::TestCase |
11 | 11 | end |
12 | 12 | |
13 | 13 | should 'list allowed blocks for center box' do |
14 | - blocks = Box.new(:position => 1).acceptable_blocks | |
14 | + blocks = Box.new.tap { |b| b.position = 1 }.acceptable_blocks | |
15 | 15 | |
16 | 16 | assert !blocks.include?('block') |
17 | 17 | assert !blocks.include?('disabled-enterprise-message-block') |
... | ... | @@ -48,7 +48,7 @@ class BoxTest < ActiveSupport::TestCase |
48 | 48 | end |
49 | 49 | |
50 | 50 | should 'list allowed blocks for box at position 2' do |
51 | - blocks = Box.new(:position => 2).acceptable_blocks | |
51 | + blocks = Box.new.tap { |b| b.position = 2 }.acceptable_blocks | |
52 | 52 | |
53 | 53 | assert !blocks.include?('main-block') |
54 | 54 | assert !blocks.include?('block') | ... | ... |