lib/kaminari_rspec/test_helpers.rb in kaminari-rspec-0.14.1.b1 vs lib/kaminari_rspec/test_helpers.rb in kaminari-rspec-0.14.1
- old
+ new
@@ -36,46 +36,38 @@
return values
end
def stub_pagination_with_rspec(resource, values)
- puts('Stubbing pagination methods with RSpec mocks')
-
values.each do |key, value |
allow(resource).to receive(key).and_return(value)
end
return resource
end
def stub_pagination_with_rr(resource, values)
- puts('Stubbing pagination methods with RR')
-
values.each do |key, value|
eval "stub(resource).#{key} { #{value} }"
end
return resource
end
def stub_pagination_with_mocha(resource, values)
- puts('Stubbing pagination methods with mocha')
-
values.each do |key, value|
resource.stubs(key).returns(value)
end
return resource
end
def stub_pagination_with_flexmock(resource, values)
-
- puts('Stubbing pagination methods with flexmock')
mock = flexmock(resource)
values.each do |key, value|
mock.should_receive(key).zero_or_more_times.and_return(value)