2009-02-12 21:27, Mark Wilden:
> It seems logical that #errors_on would call valid? Otherwise, how
> would it know?
...and that's exactly what I thought too.
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
___
rspec-users mailing list
rspec-use
Mark Wilden wrote:
It seems logical that #errors_on would call valid? Otherwise, how would it know?
That intuitively makes sense.
The reason the whole issue is confusing is because of AR's behaviour:
>> User.new.valid?
=> false
>> User.new.errors.to_a
=> []
errors_on(:foo) looks like it'l
On Thu, Feb 12, 2009 at 8:31 PM, Tero Tilus wrote:
> 2009-02-12 15:42, Pat Maddox:
>>> The fact that you are asking this shows that we're violating the
>>> principle of least surprise.
>>
>> Yes it's a surprise
>
> How do you know #errors_on not implicitly validating wouldn't be
> bigger surprise?
It seems logical that #errors_on would call valid? Otherwise, how would it know?
///ark
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
2009-02-12 15:42, Pat Maddox:
>> The fact that you are asking this shows that we're violating the
>> principle of least surprise.
>
> Yes it's a surprise
How do you know #errors_on not implicitly validating wouldn't be
bigger surprise? Say 30 (instead of three now surprised) people would
be surpr
Yury Kotlyarov wrote:
SOLVED! just need to pass matched result to inner block. gist:
http://gist.github.com/62562
Many thanks,
Yury
I was wrong. It yields just one last line from the inner block. It
passes following:
it "should have form to create a new user" do
render '/users/new'
On Thu, Feb 12, 2009 at 11:59 AM, David Chelimsky wrote:
> On Feb 12, 2009, at 1:03 PM, Nick Hoffman wrote:
>
>> Does RSpec automatically call #valid? on ActiveRecord models?
>>
>> For instance, when this example is run:
>>
>> it 'should reject a nil value' do
>> @form = TimeShiftForm.new :file
Thanks for making the other fixes! I don't have a 'have_tag' example
handy (replaced all the instances with more compact with_tag syntax)..
I'll try to get to it later today and send it to you personally.
=N
On Feb 11, 8:40 pm, David Chelimsky wrote:
> On Wed, Feb 11, 2009 at 2:52 PM, nat...@piv
SOLVED! just need to pass matched result to inner block. gist:
http://gist.github.com/62562
Many thanks,
Yury
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Feb 12, 2009, at 1:03 PM, Nick Hoffman wrote:
Does RSpec automatically call #valid? on ActiveRecord models?
For instance, when this example is run:
it 'should reject a nil value' do
@form = TimeShiftForm.new :file => nil
puts "@form.errors.count = <<#...@form.errors.count}>>"
@form.sho
On Thu, Feb 12, 2009 at 11:03 AM, Nick Hoffman wrote:
> Does RSpec automatically call #valid? on ActiveRecord models?
>
> For instance, when this example is run:
>
> it 'should reject a nil value' do
> @form = TimeShiftForm.new :file => nil
>
> puts "@form.errors.count = <<#...@form.errors.count
Does RSpec automatically call #valid? on ActiveRecord models?
For instance, when this example is run:
it 'should reject a nil value' do
@form = TimeShiftForm.new :file => nil
puts "@form.errors.count = <<#...@form.errors.count}>>"
@form.should have(1).error_on :file
puts "@form.errors.c
Ack, that subject is completely wrong! I forgot to update it after re-
writing the email.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
I'm experiencing some strange behaviour with an ActiveRecord model
object. I'm trying to spec that a mocked AR object, @form, has an
error on the "file" attribute.
I've confirmed that there *is* an error on the "file" attribute,
because I print out the error.
However, the spec fails, sayi
On 31/01/2009, at 1:45 AM, jschank wrote:
Hello,
I recently unpacked the latest (1.1.12) rspec and rspec rails in my
applicaiton.
When I run my specs I get:
config.gem: Unpacked gem rspec-1.1.12 in vendor/gems has no
specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpa
On Thu, Feb 12, 2009 at 9:25 AM, James Byrne
wrote:
Pat Maddox wrote:
You are completely out of line even suggesting that David is selfish
or unprofessional. Do you have any clue how many changes he HASN'T
made because it would break backwards compatibility? How much effort
goes into sensi
David Chelimsky wrote:
On Thu, Feb 12, 2009 at 5:52 AM, Yury Kotlyarov wrote:
Hi,
I am trying to write custom matcher which accepts block to spec views with
forms/fieldsets/inputs eg
view:
---
Personal Information
First name
...
spec:
---
it "shou
I installed it via the Gem package manager ?
The version I have installed is cucumber-0.1.16
And I have just re written the features file as suggested in the link
and it works
Weird that the addition in the examples works even though it is in the
older format??
Thanks Heaps - I can now
I am getting the same error with version 2.2.2; I'm testing out Heroku
right now and am not sure of my ability to install it manually but will
try. I'm not especially experienced with any of this, so if anyone's got
any tips they're welcome :)
--
Posted via http://www.ruby-forum.com/.
Pat Maddox wrote:
>
> You are completely out of line even suggesting that David is selfish
> or unprofessional. Do you have any clue how many changes he HASN'T
> made because it would break backwards compatibility? How much effort
> goes into sensibly deprecating stuff? The work he does to kee
Those features look out of date to me. The Scenarios / More Examples
format has been deprecated in the latest version on Github.
Which version of cucumber are you using?
Try this instead:
http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines
On 12 Feb 2009, at 12:01, Beaton, Malcol
On Thu, Feb 12, 2009 at 5:52 AM, Yury Kotlyarov wrote:
> Hi,
>
> I am trying to write custom matcher which accepts block to spec views with
> forms/fieldsets/inputs eg
>
> view:
> ---
>
>
> Personal Information
>
>
> First name
>
>
> ...
>
>
>
>
> spec:
> -
Hi,
I am trying to write custom matcher which accepts block to spec views
with forms/fieldsets/inputs eg
view:
---
Personal Information
First name
...
spec:
---
it "should have form with input fields" do
render ...
response.should have_form(
Justin Smestad wrote:
> Daniel, I have fixed this in my fork:
> http://github.com/jsmestad/merb_cucumber/tree/master
>
Thanks! IT WORKS!
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.or
Hi everyone
I am trying to run the CS examples using Iron ruby/ cucumber from the
download and have hit a really irritating snag
I have added a subtract method to the CS calculator - Re compiled -
Added a features file for it and when I run I get the following
Scenario: subtra
kaleem,
method new does not run your model validations, neither does your provided
activate! implementation.
but save indeed does.
my guess is your mixing several contexts (cases, situations) in your single
spec. Try decoupling all with more granular examples and you'll get to save
shore :-)
cheers
26 matches
Mail list logo