I can't figure out why when I run all the tests with
rspec
command, they all are run.
If I run a helper spec separately like that:
rspec spec/helpers/application_helper_spec.rb
it fails as follows:
spec/helpers/application_helper_spec.rb:3:in `<top (required)>':
uninitialized constant ApplicationHelper (NameError)
from
/Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in
`load'
from
/Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in
`block in load_spec_files'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/
core/configuration.rb:1325:in `each'
from
/Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in
`load_spec_files'
from
/Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in
`setup'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/
core/runner.rb:88:in `run'
from
/Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in
`run'
from
/Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in
`invoke'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.3.2/exe/rspec:
4:in `<top (required)>'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/bin/rspec:23:in `load'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/bin/rspec:23:in `<main>'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
`eval'
from /Users/serge-mac/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
`<main>'
Here is the application_helper_spec.rb:
equire 'spec_helper'
describe ApplicationHelper, :type => :helper do
describe "generating full title" do
let(:base_title) { I18n.t(:base_title)}
it "should concatenate page title with base title" do
expect(full_title('some page title')).to eq("#{base_title} | some
page title")
end
...
end
end
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/df712b98-e1ef-4835-ba01-57b810669a08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.