test/oprah/controller_helpers_test.rb in oprah-0.1.2 vs test/oprah/controller_helpers_test.rb in oprah-0.1.3

- old
+ new

@@ -33,26 +33,26 @@ presenter = @controller.present(User.new) assert_kind_of UserPresenter, presenter assert_kind_of EntityPresenter, presenter - assert_equal :ok, presenter.view_context + assert_equal "ok", presenter.view_context.to_s end - def test_present + def test_present_custom_view_context + presenter = @controller.present(User.new, view_context: :foobar) + assert_equal :foobar, presenter.view_context + end + + def test_present_many presenters = @controller.present_many([User.new, User.new]) assert_equal 2, presenters.length presenters.each do |presenter| assert_equal "Foo Bar", presenter.name - assert_equal :ok, presenter.view_context + assert_equal "ok", presenter.view_context.to_s end - end - - def test_present_custom_view_context - presenter = @controller.present(User.new, view_context: :foobar) - assert_equal :foobar, presenter.view_context end def test_helper_method assert_equal [:present, :present_many], Controller.helper_methods end