capybara得到请求而不是发布

时间:2015-04-24 16:48:09

标签: ruby-on-rails tdd capybara

所有

我被Capybara和Rails困住了。 在视图中,我有一个方法的链接:: post

angular.module('anotherModule')
  .controller('AnotherCtrl', ['$scope', 'myData',
    function($scope, myData) {
      // BOO DOESN'T WORK
      console.log(myData);
    }
  ]);

在我的工作计算机(Ubuntu)上所有规格都通过正常,但在家用计算机(Mac OS X)上,出现错误

= link_to t(:add_to_cart), offer_add_to_cart_path(offer), class: 'btn', remote: true, method: :post

当水豚做的时候

Failure/Error: Unable to find matching line from backtrace
 ActionController::RoutingError:
   No route matches [GET] "/offers/1/add_to_cart"

rails(4.2.1) 水豚(2.4.4) capybara-webkit(1.5.0)

0 个答案:

没有答案
相关问题