spec/unit/test_helpers_spec.rb in warden-github-rails-1.0.0 vs spec/unit/test_helpers_spec.rb in warden-github-rails-1.0.1

- old
+ new

@@ -4,21 +4,21 @@ describe '#github_login' do context 'when no scope is specified' do it 'uses the default scope from config to login' do Warden::GitHub::Rails.stub(:default_scope => :foobar) should_receive(:login_as).with do |_, opts| - opts.fetch(:scope).should be :foobar + expect(opts.fetch(:scope)).to eq(:foobar) end github_login end end context 'when a scope is specified' do it 'uses that scope to login' do should_receive(:login_as).with do |_, opts| - opts.fetch(:scope).should be :admin + expect(opts.fetch(:scope)).to eq(:admin) end github_login(:admin) end end @@ -26,14 +26,14 @@ it 'logs in a mock user' do expected_user = nil should_receive(:login_as).with do |user, _| expected_user = user - user.should be_a Warden::GitHub::Rails::TestHelpers::MockUser + expect(user).to be_a(Warden::GitHub::Rails::TestHelpers::MockUser) end user = github_login - user.should be expected_user + expect(user).to eq(expected_user) end end end