mercredi 6 mai 2015

no route error in test works in dev

so I have a route http://ift.tt/1AGyBmZ (using pow) in the browser I get an empty array [] which is perfect, there isn't anything in the db yet, so I should get an empty array

in my rspec test I have

  setup do
    host! 'api.gemstore.dev'
  end

  test 'As a user, I want to get gems' do
    get '/gems', {}, { 'Accept' => Mime::JSON }
    assert_equal 200, response.status
    assert_equal Mime::JSON, response.content_type
  end

but this comes back with a no route matches error

Aucun commentaire:

Enregistrer un commentaire