> but what if my method looks like:
>
> user = User.where("...")
> user2 = User.where("...")
User.should_receive(:where).with("...").and_return(...)
http://apidock.com/rspec/Spec/Mocks
Patrick J. Collins
http://collinatorstudios.com___
rspec-users
I'm a bit confused how to hook into a particular model object instance and
mock/stub it?
I understand how to hook into a class level method like:
User.should_receive(:where).and_return()
but what if my method looks like:
def some_thing
user = User.where("...")
user2 = User.where("
Thank you, David. After removing the Webrat stuff everything runs
perfectly again.
Regards,
Kai
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Jun 17, 2011, at 2:20 PM, Kai Schlamp wrote:
> Here is also the spec helper I use for my integration tests:
>
> ENV["RAILS_ENV"] ||= 'test'
> require File.expand_path("../../config/environment", __FILE__)
> require 'rspec/rails'
> require 'webrat'
> require 'capybara/rspec'
> require "database
Here is also the spec helper I use for my integration tests:
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'webrat'
require 'capybara/rspec'
require "database_cleaner"
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each
Hi.
I use RSpec-Rails 2.6.1 together with Capybara 1.0.0.
Whenever I start my integration (request) tests I get the following
error:
Failure/Error: page.execute_script('$
("div.editable:first").trigger("mouseover");')
Selenium::WebDriver::Error::UnexpectedJavascriptError:
$ is not de