Sha256: bc62ea097735d597eb0220923a7dd6c4cb2ae0ab76784a7e03df7b3b4d656c3d

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

require "test_helper"

class CharactersControllerTest < ActionDispatch::IntegrationTest
  setup do
    @mock_fetcher = mock('object')
    Container.deps.replace(:characters_fetcher, @mock_fetcher)
  end

  teardown do
    Container.deps.restore!
  end

  test "should get index" do
    characters = []
    @mock_fetcher.expects(:fetch).returns(characters)

    get characters_url, as: :json

    assert_response :success
    assert response.body == '[]'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ringu-0.1.1.pre.alpha example/test/controllers/characters_controller_test.rb