Updated the version of WebMock required

This commit is contained in:
erwanlr
2014-02-02 15:13:26 +01:00
parent b1535864aa
commit 2c0bbe9082
2 changed files with 5 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ gem "terminal-table"
gem "ruby-progressbar", ">=1.2.0"
group :test do
gem "webmock", ">=1.9.3"
gem "webmock", ">=1.17.2"
gem "simplecov"
gem "rspec", :require => "spec"
end

View File

@@ -79,7 +79,8 @@ shared_examples 'WpUser::BruteForcable' do
context 'when no password is valid' do
before do
stub_request(:post, wp_user.login_url).
#with(body: { log: login }). # produces an error : undefined method `split' for {:log=>"someuser", :pwd=>"password1"}:Hash
# with(body: { log: login }). # produces an error : undefined method `split' for {:log=>"someuser", :pwd=>"password1"}:Hash
# Fixed in WebMock 1.17.2, TODO: Modify the specs
to_return(body: 'login_error')
end
@@ -104,6 +105,7 @@ shared_examples 'WpUser::BruteForcable' do
# Due to the error with .with(body: { log: login }) above
# We can't use it to stub the request for a specific password
# So, the first one will be valid
# Fixed in WebMock 1.17.2, TODO: Modify the specs
before do
stub_request(:post, wp_user.login_url).to_return(status: 302, headers: { 'Location' => redirect_url } )