Hi all,
I am a bit confused when i type rake spec and it gives me this
message,
No examples matching ./spec/**/*_spec.rb could be found
what is that mean that something is not found.
and where i can input my the test code because i did have a tiny
sample code in user_controller_test.rb.
is that the right place to test functional…
plz give me a help
thanks
your file needs to be named user_controller_spec.rb
the _spec.rb is important
Hi Martin,
When i rename the user_controller_test.rb => user_controller_spec.rb
it gives me this error
yen@ubuntu:~/Desktop/Pictographs$ rake
(in /home/yen/Desktop/Pictographs)
/usr/local/bin/ruby -S bundle exec rspec ./spec/functional/
languages_controller_spec.rb
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/
active_support/dependencies.rb:239:in require': no such file to load -- mongoid-rspec (LoadError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/ active_support/dependencies.rb:239:in
block in require’
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/
active_support/dependencies.rb:227:in load_dependency' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/ active_support/dependencies.rb:239:in
require’
from /home/yen/Desktop/Pictographs/spec/spec_helper.rb:5:in <top (required)>' from /home/yen/Desktop/Pictographs/spec/functional/ languages_controller_spec.rb:1:in
require’
from /home/yen/Desktop/Pictographs/spec/functional/
languages_controller_spec.rb:1:in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/configuration.rb:419:in
load’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/configuration.rb:419:in block in load_spec_files' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/configuration.rb:419:in
map’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/configuration.rb:419:in load_spec_files' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/command_line.rb:18:in
run’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/runner.rb:80:in run_in_process' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/runner.rb:69:in
run’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/runner.rb:11:in `block in autorun’
rake aborted!
ruby -S bundle exec rspec ./spec/functional/
languages_controller_spec.rb failed
(See full trace by running task with --trace)
plz help…
Yennie
On Jul 5, 12:24pm, Martin W. [email protected] wrote:
check if you have
gem ‘mongoid-rspec’
I did install it already, but i try “rake spec”,
and the version is
mongoid (2.0.2)
mongoid-rspec (1.4.4)
It still gives me the same message
yen@ubuntu:~/Desktop/Pictographs$ rake
(in /home/yen/Desktop/Pictographs)
/usr/local/bin/ruby -S bundle exec rspec ./spec/functional/
system_controller_spec.rb ./spec/functional/users_controller_spec.rb
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/
active_support/dependencies.rb:239:in require': no such file to load -- mongoid-rspec (LoadError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/ active_support/dependencies.rb:239:in
block in require’
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/
active_support/dependencies.rb:227:in load_dependency' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/ active_support/dependencies.rb:239:in
require’
from /home/yen/Desktop/Pictographs/spec/spec_helper.rb:5:in <top (required)>' from /home/yen/Desktop/Pictographs/spec/functional/ system_controller_spec.rb:1:in
require’
from /home/yen/Desktop/Pictographs/spec/functional/
system_controller_spec.rb:1:in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/configuration.rb:419:in
load’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/configuration.rb:419:in block in load_spec_files' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/configuration.rb:419:in
map’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/configuration.rb:419:in load_spec_files' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/command_line.rb:18:in
run’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/runner.rb:80:in run_in_process' from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/ core/runner.rb:69:in
run’
from /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/
core/runner.rb:11:in `block in autorun’
rake aborted!
ruby -S bundle exec rspec ./spec/functional/
system_controller_spec.rb ./spec/functional/users_controller_spec.rb
failed
(See full trace by running task with --trace)
check if you have
gem ‘mongoid-rspec’
in your Gemfile. Should be part of the test group.