Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails3, Rspec2: Remarkable couldn't mock_models #13

Open
petRUShka opened this issue Jun 13, 2010 · 4 comments
Open

Rails3, Rspec2: Remarkable couldn't mock_models #13

petRUShka opened this issue Jun 13, 2010 · 4 comments

Comments

@petRUShka
Copy link

time_table_controller_spec, line 23:

mock_models :post 

Error in console:


/home/petrushka/.bundle/ruby/svn/gems/remarkable-4.0.0.alpha4/lib/remarkable/core/macros.rb:15:in method_missing': undefined methodmock_model' for :Class (NoMethodError)
from /home/petrushka/webdev/my_app/spec/controllers/admin/timetable_controller_spec.rb:23:in `block (2 levels) in <top (required)>

spec_helper: https://gist.github.com/1d92348b08b71a5fc798

ruby 1.9.3dev (2010-05-08 trunk 27674) [x86_64-linux]
spork (0.8.4)
Rails 3: beta3
Rspec2: beta11

@hosh
Copy link
Contributor

hosh commented Jun 14, 2010

I don't remember, but isn't mock_model part of Remarkable::Rails?

@petRUShka
Copy link
Author

@hosh
Copy link
Contributor

hosh commented Jun 14, 2010

Right.

Remarkable/Rails is not implemented, mock_model will not work. The doc you are looking at is for Remarkable 3. Someone else may port over remarkable/rails, but I am not likely to port it because I don't have a need for it.

Have you looked at Rspec let() and the new Rspec metadata?

This is an example of something I wrote with using pure Rspec 2: https://gist.github.com/741657dae42ae9706672

Think about it.

@petRUShka
Copy link
Author

No, i haven't look for let. Thank you for direction, I will look at them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants