Displaying 9 results from an estimated 9 matches for "should_".
Did you mean:
should
2007 Nov 07
1
Helper methods starting with should_ get picked up as examples?
Hi!
I recently updated my rspec and rspec_on_rails plugins to the tip of
the trunk and ran into an issue with helper methods with names
starting with should_ in my describe blocks. Fictive example to show
what I''m talking about:
describe Order do
it "Can be paid for" do
...
should_have_paid(user)
end
def should_have_paid(user)
end
end
I know in some places I should (ah, there is that word again...) be
us...
2007 Nov 18
8
helper methods starting with should
Hi all,
As an experiment in playing nice with others, we''ve added the ability
in rspec''s trunk to do this:
class ThingExamples < Spec::ExampleGroup
def should_do_stuff
...
end
end
This is how rspec 0.1 worked, and for people already comfortable with
the classes/methods approach of Test::Unit, it is a more comfortable
entry point to rspec.
For others, however, it has created a problem: you can''t write helper
methods that start with should...
2007 Apr 09
10
changes in 0.8 and greater - should_
Has the should_... syntax changed? I''m getting errors when running
the following:
should_render(:index)
should_be_valid
should_not_be_valid
should_respond_to
should_be
should_render
I thought the syntax changed to something like the following:
obj.should render(:index)
but this doesn''t se...
2006 Oct 24
5
Radrails and RSpec
Hi all,
Does anyone know how to get radrails to use RSpec specs instead of tests?
Cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
2007 May 30
2
should_eql etc?
Hi, I''m trying the specs for restful_authentication I found here
http://jonathan.tron.name/articles/2007/01/02/rspec-on-rails-restful-
authentication
It seems to use custom .should methods: should_eql,
should_be_an_instance_of, should_redirect_to, should_be_success,
should_not_be_nil, should_be_nil, should_not_be_nil, should_be_empty,
should_be_success, should_not_change, and should_not_be_activated
Is this using an old version of rspec, and/or do i need to define
these methods and...
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/
shoulda/) on a project and I saw some things that would be really nice
to see in rspec, namely the should_ methods, and especially the
should_be_restful method. Do these go against the rspec goals at
all? Or could an ambitious programmer go to town implementing these
for rspec_on_rails?
Nathan Sutton
fowlduck at gmail.com
rspec 1.1
rspec_on_rails 1.1
rails 2.0.2
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta.
19" .
I have following code at spec/models/user_spec.rb
require ''spec_helper''
describe User do
it { should validate_presence_of(:email) }
it { should validate_presence_of(:name) }
end
Here is my gemfile
group :development, :test do
gem ''factory_girl_rails'',
2010 Dec 23
6
Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?
Here''s my issue: running ruby -I test test/unit/something_test.rb for
each of my unit tests works perfectly.
However, running rake test:units brings errors in all of them - some
object becomes nil for some reason.
Why might this be happening?
Specifics: the object that is successfully not nil when I run the unit
tests one-by-one but becomes nil when I do rake test:units is defined
like
2006 Nov 30
41
TDD killing my joy of Rails
I''ve been working through the book ''Beginning Ruby on Rails E-Commerce''
which is very heavy on Test Driven Development. As in, you have to
write tests for scaffolding methods and validations and crap like that.
And then they fail. And you KNOW its the test not the method. So you
spend 2x the time writing a test that has to be adapted when
requirements change. You