Using rails and rspec it is easy to get rspec to create the necessary files for me when I use the command rails generatewith models / views / controllers. But now I want to write specifications for the module that I wrote. The module is in /lib/my_module.rb, so I created the specification in/spec/lib/my_module_spec.rb
The problem that I am facing is that when I try to execute rspec spec/, the file is executed my_module_spec.rb, but the link to my module in lib/my_module.rbcannot be found. What is the right way to do this?
Just FYI in the file my_module_spec.rbis require 'spec_helper'already in it
require 'spec_helper'
describe "my_module" do
it "first test"
result = MyModule.some_method
end
end
Brand