Zach Dennis wrote:
>> response.body.should be_xml_with do
>> form :action => '/users' do
>>fieldset do
>> legend "Personal Information"
>> label "First name"
>> input :type => 'text', :name => 'user[first_name]'
>>end
>> end
>> end
> I like this a lot.
Boom: http://gist
Hi,
I am in the process of upgrading my rails application to be compatible
with rails 2.2.2. All is going well apart from a few remaining issues.
My problem is: I am experiencing a test failure with what seems to be
related to the "with_output_buffer" method found in "lib/action_view/
helpers/capt
On Mon, Mar 9, 2009 at 4:44 AM, karmacoma wrote:
> Hi,
> I am in the process of upgrading my rails application to be compatible
> with rails 2.2.2. All is going well apart from a few remaining issues.
>
> My problem is: I am experiencing a test failure with what seems to be
> related to the "with_
On Fri, Mar 6, 2009 at 1:27 PM, Tom Ten thij wrote:
>
> > I'm afraid I can't give a release date. 0.2 is fixed(ish) scope, and
> > therefore time can't be fixed at the same time. I have a lot of travel
> > the next month, so it will take a least a month I'm afraid.
>
> I know I for one would sure
Zach Dennis wrote:
> In my experience relying on the syntactic details of the page is
> extremely brittle and cumbersome. ... Some tags have both syntactic
> and semantic meaning, such as forms, labels, fieldsets, and anchor tags.
>
Is it "brittle" to test for specific css selectors that are tie
I must be missing something obvious here but I cannot seem to see it.
I have this step definition:
When /entity named "(.*)" has a legal name "(.*)"/ do |name, legal|
myentity = Entity.find_by_entity_common_name!(name.hll_keycase)
myentity.entity_legal_name.should equal legal.hll_keycase
end
Use should == instead of equal. == is equality, equal is object
identity. You very rarely want to use equal.
>> "foo".equal? "foo"
=> false
>> "foo" == "foo"
=> true
Pat
On Mar 9, 2009, at 10:18 AM, James Byrne wrote:
I must be missing something obvious here but I cannot seem to see it.
On Mon, Mar 9, 2009 at 6:18 PM, James Byrne wrote:
> I must be missing something obvious here but I cannot seem to see it.
>
> I have this step definition:
>
> When /entity named "(.*)" has a legal name "(.*)"/ do |name, legal|
> myentity = Entity.find_by_entity_common_name!(name.hll_keycase)
>
At 10:54 -0700 3/9/09, Pat Maddox wrote:
> Use should == instead of equal. == is equality, equal
> is object identity. You very rarely want to use equal.
It's probably far too late to change this, but it might
have made more sense to define same_obj_as?() for the
object identity case, leaving eq
On Mon, Mar 9, 2009 at 2:32 PM, Rich Morin wrote:
> At 10:54 -0700 3/9/09, Pat Maddox wrote:
>> Use should == instead of equal. == is equality, equal
>> is object identity. You very rarely want to use equal.
>
> It's probably far too late to change this, but it might
> have made more sense to de
Pat Maddox wrote:
> Use should == instead of equal. == is equality, equal is object
> identity. You very rarely want to use equal.
>
> >> "foo".equal? "foo"
> => false
> >> "foo" == "foo"
> => true
>
> Pat
Thanks. Although, if I recall correctly then I am advised to use the
form
"x.shoul
Sent from my iPhone
On Mar 9, 2009, at 1:56 PM, James Byrne wrote:
Pat Maddox wrote:
Use should == instead of equal. == is equality, equal is object
identity. You very rarely want to use equal.
"foo".equal? "foo"
=> false
"foo" == "foo"
=> true
Pat
Thanks. Although, if I recall c
To prevent duplicate values in the DBMS I use a unique index on those
columns. I am testing that duplicate values cannot, in fact, be added.
This is the cucumber scenario:
Scenario: The legal name must be unique
Given I do have a user named "admin"
And the user named "admin" is authe
James Byrne wrote:
Q.
> To prevent duplicate values in the DBMS I use a unique index on those
> columns. I am testing that duplicate values cannot, in fact, be added.
> I thought, probably incorrectly, that when #save is called then any
> errors are returned to the controller to handle. This is
James Byrne wrote:
Zach Dennis wrote:
In my experience relying on the syntactic details of the page is
extremely brittle and cumbersome. ... Some tags have both syntactic
and semantic meaning, such as forms, labels, fieldsets, and anchor tags.
Is it "brittle" to test for specific css selecto
David Chelimsky wrote:
>
> No, no, no :)
>
> 5.should == 5
> 6.should be > 5
>
> Read them aloud and they.should make(:sense).
>
> Cheers,
> David
Perhaps it is my dialect, but what is wrong with:
"5 should be equal to 5"
which generally is how I read "=="? Actually, I tend to read "==" (
ActiveRecord doesn't know anything about db constraint errors. If one
is violated, the error propagates up in the form of an exception.
Put a validates_uniqueness_of :login_name on your User class, and
you'll get the behavior you want. You can keep the db constraint in
as a safety net aga
Pat Maddox wrote:
> ActiveRecord doesn't know anything about db constraint errors. If one
> is violated, the error propagates up in the form of an exception.
>
I realize that, but the exception is of the
ActiveRecord:StatementInvalid class, which I should be able to catch in
the controller wit
On Mar 9, 2009, at 4:53 PM, James Byrne wrote:
Pat Maddox wrote:
ActiveRecord doesn't know anything about db constraint errors. If
one
is violated, the error propagates up in the form of an exception.
I realize that, but the exception is of the
ActiveRecord:StatementInvalid class, which
On Mon, Mar 9, 2009 at 2:48 PM, James Byrne wrote:
> David Chelimsky wrote:
>>
>> No, no, no :)
>>
>> 5.should == 5
>> 6.should be > 5
>>
>> Read them aloud and they.should make(:sense).
>>
>> Cheers,
>> David
>
> Perhaps it is my dialect, but what is wrong with:
>
> "5 should be equal to 5"
>
>
ActiveRecord doesn't know anything about db constraint errors. If
one
is violated, the error propagates up in the form of an exception.
I realize that, but the exception is of the
ActiveRecord:StatementInvalid class, which I should be able to catch
in
the controller with a rescue clause.
On Mon, Mar 9, 2009 at 12:08 PM, James Byrne wrote:
> Zach Dennis wrote:
>
>> In my experience relying on the syntactic details of the page is
>> extremely brittle and cumbersome. ... Some tags have both syntactic
>> and semantic meaning, such as forms, labels, fieldsets, and anchor tags.
>>
>
> I
http://gist.github.com/76136
response.body.should be_html_with{
form :action => '/users' do
fieldset do
legend 'Personal Information'
label 'First name'
input :type => 'text', :name => 'user[first_name]'
end
end
}
Has anyone tr
On Mon, Mar 9, 2009 at 8:48 PM, James Byrne wrote:
> David Chelimsky wrote:
> >
> > No, no, no :)
> >
> > 5.should == 5
> > 6.should be > 5
> >
> > Read them aloud and they.should make(:sense).
> >
> > Cheers,
> > David
>
> Perhaps it is my dialect, but what is wrong with:
>
> "5 should be equa
On Mon, Mar 9, 2009 at 6:20 PM, Phlip wrote:
>> http://gist.github.com/76136
>
>> response.body.should be_html_with{
>> form :action => '/users' do
>> fieldset do
>> legend 'Personal Information'
>> label 'First name'
>> input :type => 'text', :name => 'us
>
> Has anyone tried this? is it useful?
>
It looks interesting, though it could be confused for trying to exactly
mimic the actual markup, not just specify interesting parts.
On Mon, Mar 9, 2009 at 7:20 PM, Phlip wrote:
> http://gist.github.com/76136
>>
>
> response.body.should be_html_wit
Tim Glen wrote:
> Just a stab in the dark, but I haven't seen any mention of calling
> save vs. save!. save just puts any errors in the model, save! will
> raise the exception if there are any errors. That may not be the case
> for ActiveRecord:StatementInvalid exception, but I thought i'd mention
On Mon, Mar 9, 2009 at 6:49 PM, Pat Nakajima wrote:
>> Has anyone tried this? is it useful?
>
> It looks interesting, though it could be confused for trying to exactly
> mimic the actual markup, not just specify interesting parts.
What is the method name was be_html_including instead of be_html_w
Just a stab in the dark, but I haven't seen any mention of calling
save vs. save!. save just puts any errors in the model, save! will
raise the exception if there are any errors. That may not be the case
for ActiveRecord:StatementInvalid exception, but I thought i'd
mention
it anyway.
I wond
Pat Nakajima wrote:
Has anyone tried this? is it useful?
It looks interesting, though it could be confused for trying to exactly
mimic the actual markup, not just specify interesting parts.
It only specifies interesting parts. The gist writeup explained that, for
example, it skipped ov
On Mar 9, 2009, at 1:53 PM, James Byrne wrote:
Pat Maddox wrote:
ActiveRecord doesn't know anything about db constraint errors. If
one
is violated, the error propagates up in the form of an exception.
I realize that, but the exception is of the
ActiveRecord:StatementInvalid class, which I
I haven't tried it yet, but it does seem very useful. The project I'm
focused on right now is all json all the time, so I don't personally
have a real world case for this at the moment. Anybody doing an app w/
html views willing to try this out?
I put it into my current project today (as a >coug
Hi,
I've just started using prawn but am at a bit of a loss how to create my
view specs for it.
For example, my normal view spec has things like
response.should have_tag("blah")
or
response.body.should =~ /something/
How do I do this with prawn output?
--
Posted via http://www.ruby-forum.com/.
__
33 matches
Mail list logo