开发者

Rails 3-Cucumber-Omniauth and issue .... :(

I have updated my bundle, and since, my acceptance tests do not pass ...

when /^Facebook reply$/ do
  Devise::OmniAuth.short_circuit_authorizers!
  Devise::OmniAuth.stub!(:facebook) do |b|
    b.post('/oauth/access_token') { [200, {}, ACCESS_TOKEN.to_json] }
    b.get('/me?access_token=plataformatec') { [200, {}, FACEBOOK_INFO.to_json] }
  end
  visit '/users/auth/facebook/callback'
end

And i have the following error :

Devise is not missing constant TestHelpers! (ArgumentError)
./features/step_definitions/users_connect_steps.rb:20:in `/^Facebook reply$/'
features/users_connect.feature:9:in `And Facebook reply'

The line 20 is: Devise::OmniAuth.short_circuit_authorizers!

And this is my bundle list

Gems included by the bundle:
  * ZenTest (4.5.0)
  * abstract (1.0.0)
  * actionmailer (3.0.6)
  * actionpack (3.0.6)
  * activemodel (3.0.6)
  * activerecord (3.0.6)
  * activeresource (3.0.6)
  * activesupport (3.0.6)
  * addressable (2.2.5)
  * arel (2.0.9)
  * autotest (4.4.6)
  * bcrypt-ruby (2.1.4)
  * bson (1.3.0)
  * bson_ext (1.3.0)
  * builder (2.1.2)
  * bundler (1.0.10)
  * cancan (1.6.4)
  * capistrano (2.5.21)
  * carrierwave (0.5.3)
  * configuration (1.2.0)
  * cucumber (0.10.2)
  * cucumber-rails (0.4.1)
  * database_cleaner (0.6.6)
  * devise (1.3.0.dev 1f51524)
  * diff-lcs (1.1.2)
  * erubis (2.6.6)
  * factory_girl (1.3.3)
  * factory_girl_rails (1.0.1)
  * faraday (0.6.0)
  * gcoder (0.11.0 655e7d0)
  * gherkin (2.3.5)
  * haml (3.0.24)
  * haml-rails (0.3.4)
  * hashie (1.0.0)
  * heroku (1.20.1)
  * highline (1.6.1)
  * hpricot (0.8.3)
  * i18n (0.5.0)
  * jquery-rails (0.2.7)
  * json (1.5.1)
  * launchy (0.3.7)
  * mail (2.2.15)
  * mime-types (1.16)
  * mini_magick (3.2)
  * mongo (1.3.0)
  * mongoid (2.0.1)
  * multi_json (0.0.5)
  * multipart-post (1.1.0)
  * net-scp (1.0.4)
  * net-sftp (2.0.5)
  * net-ssh (2.1.4)
  * net-ssh-gateway (1.0.1)
  * nokogiri (1.4.4)
  * oa-core (0.2.1)
  * oa-oauth (0.2.1)
  * oa-openid (0.2.1)
  * oauth (0.4.4)
  * oauth2 (0.2.0)
  * orm_adapter (0.0.4)
  * polyglot (0.3.1)
  * rack (1.2.2)
  * rack-mount (0.6.14)
  * rack-openid (1.2.0)
  * rack-test (0.5.7)
  * rails (3.0.6)
  * rails3-generators (0.17.4)
  * railties (3.0.6)
  * rake (0.8.7)
  * rest-client (1.6.1)
  * rspec (2.5.0)
  * rspec-core (2.5.1)
  * rspec-expectations (2.5.0)
  * rspec-mocks (2.5.0)
  * rspec-rails (2.5.0)
  * ruby-openid (2.1.8)
  * ruby-openid-apps-discovery (1.2.0)
  * ruby_parser (2.0.6)
  * sexp_processor (3.0.5)
  * simple_form (1.3.1)
  * subexec (0.0.4)
  * switch_user (0.6.0 008d360)
  * term-ansicolor (1.0.5)
  * thor (0.14.6)
  * treetop (1.4.9)
  * tzinfo (0.3.26)
  * warden (1.0.3)
  * webrat (0.7.3)
  * will_paginate (3.0.pre2)
  * workflow (0.8.0)
  * workflow_on_mongoid (0.8开发者_运维百科.0.1)
  * yajl-ruby (0.8.2)

If you have any idea ? Thanks !!!!!!!!!!!!!!!!!!!!


Devise 1.2 removed Devise::OmniAuth::TestHelpers, now you should use Omniauth test helpers. Install devise 1.2.0 and you will see the proper error messages (and stop using it straight from the git repository).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜