How to solve error " add some examples to (or delete) "

55 views
Skip to first unread message

Jaimin Pandya

unread,
Apr 27, 2014, 10:44:53 AM4/27/14
to rubyonra...@googlegroups.com
When I run command for tests by using:

bundle exec rspec spec/

Then I got error like as follow:

Pending:

users/new.html.erb add some examples to (or delete)
/home/jaimin/rails3/rails_projects/sample_app/spec/views/users/new.html.erb_spec.rb
# No reason given
# ./spec/views/users/new.html.erb_spec.rb:4

UsersHelper add some examples to (or delete)
/home/jaimin/rails3/rails_projects/sample_app/spec/helpers/users_helper_spec.rb
# No reason given
# ./spec/helpers/users_helper_spec.rb:14

Finished in 1.19 seconds
14 examples, 0 failures, 2 pending

How can I solve this?

Kind regards.

--
Posted via http://www.ruby-forum.com/.

Hassan Schroeder

unread,
Apr 27, 2014, 11:44:50 AM4/27/14
to rubyonrails-talk
On Sun, Apr 27, 2014 at 7:44 AM, Jaimin Pandya <li...@ruby-forum.com> wrote:
> When I run command for tests by using:
>
> bundle exec rspec spec/
>
> Then I got error like as follow:
>
> Pending:
>
> users/new.html.erb add some examples to (or delete)
> /home/jaimin/rails3/rails_projects/sample_app/spec/views/users/new.html.erb_spec.rb

> How can I solve this?

By reading and following the directions in the message?

Have you even looked at the files referenced?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Jaimin Pandya

unread,
Apr 28, 2014, 6:16:57 AM4/28/14
to rubyonra...@googlegroups.com
>> users/new.html.erb add some examples to (or delete)
>>
>
/home/jaimin/rails3/rails_projects/sample_app/spec/views/users/new.html.erb_spec.rb
>
>> How can I solve this?
>
> By reading and following the directions in the message?
>
> Have you even looked at the files referenced?

It is right I should follow the directions which is given in message.

The " users_helper_spec.rb " file contain following code:

require 'spec_helper'

# Specs in this file have access to a helper object that includes
# the UsersHelper. For example:
#
# describe UsersHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe UsersHelper do
pending "add some examples to (or delete) #{__FILE__}"
end

which example should I add? The example given in comment form, that
should I add in " users_helper_spec.rb " file?

Frederick Cheung

unread,
Apr 28, 2014, 7:10:27 AM4/28/14
to rubyonra...@googlegroups.com

On Monday, April 28, 2014 11:16:57 AM UTC+1, Ruby-Forum.com User wrote:
It is right I should follow the directions which is given in message.

The " users_helper_spec.rb " file contain following code:

require 'spec_helper'

# Specs in this file have access to a helper object that includes
# the UsersHelper. For example:
#
# describe UsersHelper do
#   describe "string concat" do
#     it "concats two strings with spaces" do
#       helper.concat_strings("this","that").should == "this that"
#     end
#   end
# end
describe UsersHelper do
  pending "add some examples to (or delete) #{__FILE__}"
end

which example should I add? The example given in comment form, that
should I add in " users_helper_spec.rb " file?


That depends entirely on what your code does. Typically you would have a group of specs testing various cases for each of the methods in UsersHelper.

If you're not going to write any specs then you can just delete the file.

Fred

Jaimin Pandya

unread,
Apr 28, 2014, 10:38:28 PM4/28/14
to rubyonra...@googlegroups.com
Frederick Cheung wrote in post #1144297:
> On Monday, April 28, 2014 11:16:57 AM UTC+1, Ruby-Forum.com User wrote:
>> # describe UsersHelper do
>> which example should I add? The example given in comment form, that
>> should I add in " users_helper_spec.rb " file?
>>
>>
> That depends entirely on what your code does. Typically you would have a
> group of specs testing various cases for each of the methods in
> UsersHelper.
>
> If you're not going to write any specs then you can just delete the
> file.
>
> Fred

Thank you very much for your reply.
Reply all
Reply to author
Forward
0 new messages